Reading Multi Spectral Images

https://nbviewer.jupyter.org/github/thomasaarholt/hyperspy-demos/blob/master/2_SVD_and_BSS.ipynb

Multispectral Imagery

Images obtained with a ADC Lite - Tetracam's Lightweight ADC

I made pitures about:

Aluminum , Copper, Brass, Iron, Stainless Steel, Painted Iron

http://tetracam.com/Products-ADC_Lite.htm

MRobalinho - 01-06-2019 Version 8

Add Libraries

In [1]:
# Add libraries
import glob, os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from PIL import Image, ImageFilter, ImageOps
from openpyxl import load_workbook
In [2]:
# Clear all
os.system( 'cls' )

# Verify my current folder
currDir = os.path.dirname(os.path.realpath("__file__"))
mypath = currDir
print(currDir)  
C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook
In [3]:
# Path to the image files
folder = "imagedata08"

# Part name of file to filter files
end_file = ".TIF"

# Upper End File
#end_file = end_file.upper()
path = currDir + "/" + folder + "/"
end_file
Out[3]:
'.TIF'

Read images from folder

In [4]:
# Read files from folder
print(path)
print('-')
print(' ---- IMAGES ON THE FOLDER :', folder, '------- *', end_file)

list_of_images = list()  # save all images on folder for further processing 

for file in os.listdir(path):
    if file.endswith(end_file):
        print(os.path.join(file))
        list_of_images.append(file)   # save all images on folder for further processing 
print('-')        
C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/
-
 ---- IMAGES ON THE FOLDER : imagedata08 ------- * .TIF
Aluminum_01.TIF
Aluminum_02.TIF
Aluminum_03.TIF
Aluminum_04.TIF
Brass_01.TIF
Brass_02.TIF
Brass_04.TIF
Brass_05.TIF
Brass_06.TIF
Brass_07.TIF
Brass_08.TIF
CopperWire_01.TIF
CopperWire_02.TIF
CopperWire_03.TIF
CopperWire_04.TIF
CopperWire_05.TIF
Copper_01.TIF
Copper_02.TIF
Copper_03.TIF
Copper_04.TIF
Copper_05.TIF
Copper_06.TIF
Copper_07.TIF
Copper_08.TIF
Enh_Aluminum_01.TIF
Enh_Aluminum_02.TIF
Enh_Aluminum_03.TIF
Enh_Aluminum_04.TIF
Enh_Brass_01.TIF
Iron_01.TIF
Iron_02.TIF
Iron_03.TIF
Iron_04.TIF
Iron_05.TIF
Iron_06.TIF
Iron_07.TIF
Iron_08.TIF
MASK_Enh_Aluminum_01.TIF
MASK_Enh_Aluminum_02.TIF
MASK_Enh_Aluminum_03.TIF
MASK_Enh_Aluminum_04.TIF
MASK_Enh_Brass_01.TIF
PaintedIron_01.TIF
PaintedIron_02.TIF
PaintedIron_03.TIF
PaintedIron_04.TIF
PaintedIron_05.TIF
PaintedIron_06.TIF
StainlessSteel_01.TIF
StainlessSteel_02.TIF
StainlessSteel_03.TIF
StainlessSteel_04.TIF
StainlessSteel_05.TIF
StainlessSteel_06.TIF
-
In [5]:
# Create Data Frame with image information
df_image = []

Functions to the work

In [6]:
# Read image with PIL
from PIL import Image, ImageFilter, ImageOps
def read_pil_image(file1):
    #print('Reading PIL image:', file1)
    try:
        im_pil = Image.open(file1)
    except:
        print("-->Unable to load image",file1)
    return im_pil
In [7]:
# Read image with OPENCV
import cv2
def read_cv2_image(file1):
    #print('Reading CV image:',file1)
    try:
        im_cv = cv2.imread(file1)
    except:
        print("-->Unable to load image",file1)
    return im_cv
In [8]:
# Look from an chanel from then image

def channel(img, n):
    """Isolate the nth channel from the image.

       n = 0: red, 1: green, 2: blue
    """
    a = np.array(img)
    a[:,:,(n!=0, n!=1, n!=2)] *= 0
#   a[:,:,n] *= 0
#   print(Image.fromarray(a), 'Get Channel n: ', n)

    print('Get Channel n: ', n)
    return Image.fromarray(a)

# def to resize 
# Given parameters : image , number to divide (resize)
def imageResize(img, n):
    width, height = img.size 

    print('Original size:', width, '/', height, 'Resize:',n)
    
    newWidth = int(width / n)
    newHeight = int(height / n)
    img.resize((newWidth, newHeight), Image.ANTIALIAS)
    print('New size:', newWidth, '/', newHeight)
    return img
In [9]:
# Obtain main color from image
# https://convertingcolors.com/rgb-color-169_171_170.html
    
def get_main_color(path, file):
    #img = Image.open(path+file)
    file1 = path+file
    # Read image
    img = read_pil_image(file1)
    if img == None:
        print("-->Unable to load image",file1)
        
    colors = img.getcolors( 1024*1024) #put a higher value if there are many colors in your image
    print('Get main Color file:', file)
    max_occurence, most_present = 0, 0
    try:
        for c in colors:
            if c[0] > max_occurence:
                (max_occurence, most_present) = c
        return most_present
    except TypeError:
        raise Exception("Too many colors in the image")
In [10]:
#!/usr/bin/python

# Return one 24-bit color value 
def rgbToDecimal(x_rgb):
    r,g,b = rgbToRGB(x_rgb)
    rgb_dec = (r << 16) + (g << 8) + b
    #print('RGB Color:', x_rgb, '   Dec:', rgb_dec)
    return rgb_dec

# Convert 24-bit color value to RGB
def colorToRGB(c):
    r = c >> 16
    c -= r * 65536;
    g = c / 256
    c -= g * 256;
    b = c
    return [r, g, b]

def rgbToRGB(x_rgb):
    x_rgb = list(x_rgb)
    r = x_rgb[0]
    g = x_rgb[1]
    b = x_rgb[2]

    #print('rgbToRGB:',x_rgb, r,g,b)
    return r, g, b

def getRGBfromI(RGBint):
    blue =  RGBint & 255
    green = (RGBint >> 8) & 255
    red =   (RGBint >> 16) & 255
    return red, green, blue

def getIfromRGB(rgb):
    red = rgb[0]
    green = rgb[1]
    blue = rgb[2]
    #print('getIfromRGB:', red, green, blue)
    RGBint = (red<<16) + (green<<8) + blue
    return RGBint

# RGB to Hex Decimal
def rgb_to_hex(rgb):
    rgb_int = bytes(rgb).hex()
    rgb_dec = '#'+str(rgb_int)
    #print('RGB :',rgb, '  Hex Dec:', rgb_dec)
    return rgb_dec

# Test
#x_rgb = (254, 250, 255)
#rgb_hex = rgb_to_hex(x_rgb)
#rgb_dec = rgbToDecimal(x_rgb)
In [11]:
# https://github.com/conda-forge/webcolors-feedstock
# conda config --add channels conda-forge
# conda install webcolors
# It is possible to list all of the versions of webcolors available on your platform with:
#       conda search webcolors --channel conda-forge

# COLOR NAME
import webcolors
def get_color_name(rgb_x):
    min_colours = {}
    for key, name in webcolors.css21_hex_to_names.items():
        r_c, g_c, b_c = webcolors.hex_to_rgb(key)
        rd = (r_c - rgb_x[0]) ** 2
        gd = (g_c - rgb_x[1]) ** 2
        bd = (b_c - rgb_x[2]) ** 2
        min_colours[(rd + gd + bd)] = name
    print('Color name from RGB:',rgb_x,'  is :',min_colours[min(min_colours.keys())])
    return min_colours[min(min_colours.keys())]
In [12]:
# Get color name from RGB
# https://stackoverflow.com/questions/2453344/find-the-colour-name-from-a-hexadecimal-colour-code

colorof = {'#F0F8FF':"aliceblue",
'#FAEBD7':"antiquewhite",
'#00FFFF':"aqua",
'#7FFFD4':"aquamarine",
'#F0FFFF':"azure",
'#F5F5DC':"beige",
'#FFE4C4':"bisque",
'#000000':"black",
'#FFEBCD':"blanchedalmond",
'#0000FF':"blue",
'#8A2BE2':"blueviolet",
'#A52A2A':"brown",
'#DEB887':"burlywood",
'#5F9EA0':"cadetblue",
'#7FFF00':"chartreuse",
'#D2691E':"chocolate",
'#FF7F50':"coral",
'#6495ED':"cornflowerblue",
'#FFF8DC':"cornsilk",
'#DC143C':"crimson",
'#00FFFF':"cyan",
'#00008B':"darkblue",
'#008B8B':"darkcyan",
'#B8860B':"darkgoldenrod",
'#A9A9A9':"darkgray",
'#006400':"darkgreen",
'#BDB76B':"darkkhaki",
'#8B008B':"darkmagenta",
'#556B2F':"darkolivegreen",
'#FF8C00':"darkorange",
'#9932CC':"darkorchid",
'#8B0000':"darkred",
'#E9967A':"darksalmon",
'#8FBC8B':"darkseagreen",
'#483D8B':"darkslateblue",
'#2F4F4F':"darkslategray",
'#00CED1':"darkturquoise",
'#9400D3':"darkviolet",
'#FF1493':"deeppink",
'#00BFFF':"deepskyblue",
'#696969':"dimgray",
'#1E90FF':"dodgerblue",
'#B22222':"firebrick",
'#FFFAF0':"floralwhite",
'#228B22':"forestgreen",
'#FF00FF':"fuchsia",
'#DCDCDC':"gainsboro",
'#F8F8FF':"ghostwhite",
'#FFD700':"gold",
'#DAA520':"goldenrod",
'#808080':"gray",
'#008000':"green",
'#ADFF2F':"greenyellow",
'#F0FFF0':"honeydew",
'#FF69B4':"hotpink",
'#CD5C5C':"indianred",
'#4B0082':"indigo",
'#FFFFF0':"ivory",
'#F0E68C':"khaki",
'#E6E6FA':"lavender",
'#FFF0F5':"lavenderblush",
'#7CFC00':"lawngreen",
'#FFFACD':"lemonchiffon",
'#ADD8E6':"lightblue",
'#F08080':"lightcoral",
'#E0FFFF':"lightcyan",
'#FAFAD2':"lightgoldenrodyellow",
'#D3D3D3':"lightgray",
'#90EE90':"lightgreen",
'#FFB6C1':"lightpink",
'#FFA07A':"lightsalmon",
'#20B2AA':"lightseagreen",
'#87CEFA':"lightskyblue",
'#778899':"lightslategray",
'#B0C4DE':"lightsteelblue",
'#FFFFE0':"lightyellow",
'#00FF00':"lime",
'#32CD32':"limegreen",
'#FAF0E6':"linen",
'#FF00FF':"magenta",
'#800000':"maroon",
'#66CDAA':"mediumaquamarine",
'#0000CD':"mediumblue",
'#BA55D3':"mediumorchid",
'#9370DB':"mediumpurple",
'#3CB371':"mediumseagreen",
'#7B68EE':"mediumslateblue",
'#00FA9A':"mediumspringgreen",
'#48D1CC':"mediumturquoise",
'#C71585':"mediumvioletred",
'#191970':"midnightblue",
'#F5FFFA':"mintcream",
'#FFE4E1':"mistyrose",
'#FFE4B5':"moccasin",
'#FFDEAD':"navajowhite",
'#000080':"navy",
'#FDF5E6':"oldlace",
'#808000':"olive",
'#6B8E23':"olivedrab",
'#FFA500':"orange",
'#FF4500':"orangered",
'#DA70D6':"orchid",
'#EEE8AA':"palegoldenrod",
'#98FB98':"palegreen",
'#AFEEEE':"paleturquoise",
'#DB7093':"palevioletred",
'#FFEFD5':"papayawhip",
'#FFDAB9':"peachpuff",
'#CD853F':"peru",
'#FFC0CB':"pink",
'#DDA0DD':"plum",
'#B0E0E6':"powderblue",
'#800080':"purple",
'#FF0000':"red",
'#BC8F8F':"rosybrown",
'#4169E1':"royalblue",
'#8B4513':"saddlebrown",
'#FA8072':"salmon",
'#F4A460':"sandybrown",
'#2E8B57':"seagreen",
'#FFF5EE':"seashell",
'#A0522D':"sienna",
'#C0C0C0':"silver",
'#87CEEB':"skyblue",
'#6A5ACD':"slateblue",
'#708090':"slategray",
'#FFFAFA':"snow",
'#00FF7F':"springgreen",
'#4682B4':"steelblue",
'#D2B48C':"tan",
'#008080':"teal",
'#D8BFD8':"thistle",
'#FF6347':"tomato",
'#40E0D0':"turquoise",
'#EE82EE':"violet",
'#F5DEB3':"wheat",
'#FFFFFF':"white",
'#F5F5F5':"whitesmoke",
'#FFFF00':"yellow",
'#9ACD32':"yellowgreen"}


def get_rgb_color_name(rgb):
    
    hex_from_rgb = rgb_to_hex(rgb)  # transform RGB into hexadecimal
    hx = hex_from_rgb[1:8]
    #print(hx)
    # if color is found in dict
    if colorof.get(hx):return colorof[hx]

    # else return its closest available color
    m = 16777215
    k = '000000'
    for key in colorof.keys():
        key_color = key[1:8]
        #print(key_color)
        a = int(hx[:2],16)-int(key_color[:2],16)
        b = int(hx[2:4],16)-int(key_color[2:4],16)
        c = int(hx[4:],16)-int(key_color[4:],16)

        v = a*a+b*b+c*c # simple measure for distance between colors

        # v = (r1 - r2)^2 + (g1 - g2)^2 + (b1 - b2)^2

        if v <= m:
            m = v
            k = key

    return colorof[k], hex_from_rgb

# Test
#rgb_1 = (216, 220, 223)
#cname, hexdc = get_rgb_color_name(rgb_1)
#print('Found:',    cname, '  Hex:', hexdc)     # found in dict
In [13]:
# Increase the contrast image
# im - image
# xvalue = contrast value
# https://pillow.readthedocs.io/en/4.0.x/reference/ImageEnhance.html
from PIL import ImageEnhance
# Path + file name + numeric value to enhancement

def contrast(path, xfile, xvalue):
    print('   Enhance image:', xfile, '  Value:', xvalue)
    file1 = path + xfile
    # Read Image
    im = read_pil_image(file1)
    if im == None:
        print("-->Unable to load image",file1)
    
    enh = ImageEnhance.Contrast(im)
    # enh.enhance(1.0).show("30% more contrast")
    x_enh = enh.enhance(xvalue)
     # Create name file masked
    f2_file = 'Enh_' + xfile
    print('   Save enhanced file :', f2_file)
    x_enh.save(f2_file)  # save enhanced file
    return x_enh, f2_file
In [14]:
# Return RGB separately
def return_rgb_from_RGB(rgb):
    p_rgb = list(rgb)
    red   = p_rgb[0]
    green = p_rgb[1]
    blue  = p_rgb[2]
    return red, green, blue
In [15]:
# Return distance from 2 colors

# http://hanzratech.in/2015/01/16/color-difference-between-2-colors-using-python.html
# https://python-colormath.readthedocs.io/en/latest/delta_e.html#delta-e-cie-2000

from colormath.color_objects import sRGBColor, LabColor
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cie2000

def delta_2_colors(rgb_1, rgb_2):
    #print('   Delta colors: ', rgb_1, rgb_2)
    #---- first color
    xr, xg, xb = return_rgb_from_RGB(rgb_1)
    # Red Color
    color1_rgb = sRGBColor(xr, xg, xb)

    #--- other color
    rgb_1 = rgb_2
    xr, xg, xb = return_rgb_from_RGB(rgb_1)
    # Blue Color
    color2_rgb = sRGBColor(xr, xg, xb)

    # Convert from RGB to Lab Color Space
    color1_lab = convert_color(color1_rgb, LabColor)

    # Convert from RGB to Lab Color Space
    color2_lab = convert_color(color2_rgb, LabColor)

    # Find the color difference
    delta_e = delta_e_cie2000(color1_lab, color2_lab)

    #print("      The difference between the 2 color = ", delta_e)
    return delta_e
In [16]:
# Remove Background - Put red background
#https://stackoverflow.com/questions/29313667/how-do-i-remove-the-background-from-this-kind-of-image
    
import cv2
import numpy as np

def red_background(path, xfile):
    print('   Red background for image:', xfile)
    #== Parameters =======================================================================
    BLUR = 21
    CANNY_THRESH_1 = 10
    CANNY_THRESH_2 = 100
    MASK_DILATE_ITER = 10
    MASK_ERODE_ITER = 10
    MASK_COLOR = (0.0,0.0,1.0) # In BGR format

    #== Processing =======================================================================
    file1 = path + xfile
    #-- Read image -----------------------------------------------------------------------
    #img = cv2.imread(file1)
    # Read image
    img = read_cv2_image(file1)
    if img.any() == None:
        print("-->Unable to load image",file1)
    
    # Create GRAY Image
    gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)

    #-- Edge detection -------------------------------------------------------------------
    edges = cv2.Canny(gray, CANNY_THRESH_1, CANNY_THRESH_2)
    edges = cv2.dilate(edges, None)
    edges = cv2.erode(edges, None)

    #-- Find contours in edges, sort by area ---------------------------------------------
    contour_info = []
    _, contours, _ = cv2.findContours(edges, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)
    for c in contours:
        contour_info.append((
            c,
            cv2.isContourConvex(c),
            cv2.contourArea(c),
        ))
    contour_info = sorted(contour_info, key=lambda c: c[2], reverse=True)
    max_contour = contour_info[0]

    #-- Create empty mask, draw filled polygon on it corresponding to largest contour ----
    # Mask is black, polygon is white
    mask = np.zeros(edges.shape)
    for c in contour_info:
        cv2.fillConvexPoly(mask, c[0], (255))

    #-- Smooth mask, then blur it
    mask = cv2.dilate(mask, None, iterations=MASK_DILATE_ITER)
    mask = cv2.erode(mask, None, iterations=MASK_ERODE_ITER)
    mask = cv2.GaussianBlur(mask, (BLUR, BLUR), 0)
    mask_stack = np.dstack([mask]*3)    # Create 3-channel alpha mask

    #-- Blend masked img into MASK_COLOR background
    mask_stack  = mask_stack.astype('float32') / 255.0         
    img         = img.astype('float32') / 255.0    
    masked = (mask_stack * img) + ((1-mask_stack) * MASK_COLOR)  
    masked = (masked * 255).astype('uint8')                    
    
    cv2.imwrite(path+"MASK_"+xfile,masked)
    
    # Create name file masked
    f2_file = 'Mask_'+ xfile
    file2 = path + f2_file
    
    # Write masked image on disk
    print('   Save masked image with red background:', f2_file)
    cv2.imwrite(file2, masked)           # Save
    # Return name file masked and image masked
    return f2_file, masked

# Test
'''
xfile = 'Brass_001.tif'
f2_file, masked = red_background(path,xfile)
%matplotlib inline
plt.imshow(masked)
plt.title('Remove image background:'+xfile,fontsize=20)
plt.show()
'''
Out[16]:
"\nxfile = 'Brass_001.tif'\nf2_file, masked = red_background(path,xfile)\n%matplotlib inline\nplt.imshow(masked)\nplt.title('Remove image background:'+xfile,fontsize=20)\nplt.show()\n"
In [17]:
# https://convertingcolors.com/rgb-color-169_171_170.html

# return most_present RGB, RGB, color name, list RGB colors without RED, list RGB colors without back

import collections

def get_main_color_without_red_and_floor(path, f2_file):
    print('    Main color from image:', f2_file)
    file1 = path + f2_file
    
    # Read image
    img = read_pil_image(file1)
    if img == None:
        print("-->Unable to load image",file1)
        
    colors = img.getcolors( 1024*1024) #put a higher value if there are many colors in your image
    #-----
    # Create list with colors without Background red color (near Background color)
    list_non_back = list()
    list_dec_back = list()   # List from decimal colors to list_non_back
    #
    print('...  List without excluded colors')
    # Convert list to decimal color
    for color in colors:
        # Diference between colors
       # print(color[1])
        rgb = color[1]

        excluded_rgb = False
        
        #Verify color name
        xt_color_name , hexdc = get_rgb_color_name(rgb)
        
        # Exclusion for some colors (Red Backgroud, Black foor, etc)
        if "red"   in xt_color_name: 
             excluded_rgb = True
        if "black" in xt_color_name:        
             excluded_rgb = True
        if "white" in xt_color_name:
            excluded_rgb = True
        if "cream" in xt_color_name:
            excluded_rgb = True             
        
        # Force Only for non-tif files we do not delete anything
        if file.endswith('.tif'):
            excluded_rgb = False
    
        if  excluded_rgb == True:     # Exclude COLOR  
            #print("Cor excluida", rgb, xt_color_name )
            excluded_rgb = True
        else:
            # OK COLOR - Save color in the list of correct colors (list_non_back)
            #print("Cor OK", rgb, xt_color_name )
            list_non_back.append(rgb)
            # Decimal color
            rgb_dec    = rgbToDecimal(rgb)
            list_dec_back.append(rgb_dec)   
  
    #-----
    print('Count ocurrencies for color')
    most_present = 0

    # Most common color in the list - list_non_back
    x = collections.Counter(list_non_back)
    print('      4 Most common colors:', x.most_common(4))  # Five most common colors
    most_present = x.most_common(1)
    xrgb = list_non_back[0] # common color
    
    # ----- color name --
    #xt_color_name = get_color_name(xrgb)
    print('      Read color name:', xrgb)  # Color name from RGB
    xt_color_name , hexdc = get_rgb_color_name(xrgb)
    print('      Main Color file:', f2_file, ' RGB:', most_present, xrgb, ' Color name:', xt_color_name,' Hex:',hexdc)
    
    return most_present, xrgb, xt_color_name, list_non_back, list_dec_back

# Test
#xfile = 'Copper_001.tif'
#most_present, xrgb, xt_color_name, list_non_back, \
#     list_dec_back = get_main_color_without_red_and_floor(path, xfile)
In [18]:
# https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_begins/py_histogram_begins.html
# Print histogram using Opencv
import cv2
import numpy as np
from matplotlib import pyplot as plt

def print_cv_hist(path, xfile):
    file1 = path + xfile
    print('Cv2 Hist from file:', file1)
    
    # Read image
    img_cv = read_cv2_image(file1)
    if img_cv.any() == None:
        print("-->Unable to load image",file1)

    # create a mask
    mask = np.zeros(img_cv.shape[:2], np.uint8)

    # define area to extract image from original
    #    Left:height , right:length
    mask[200:1400, 200:1800] = 255
    masked_img = cv2.bitwise_and(img_cv, img_cv ,mask = mask)

    # Calculate histogram with mask and without mask
    # Check third argument for mask
    hist_full = cv2.calcHist([img_cv],[0],None,[256],[0,256])
    hist_mask = cv2.calcHist([img_cv],[0],mask,[256],[0,256])

    plt.figure(figsize=(18,5))

    plt.subplot(141), plt.imshow(img_cv, 'gray')
    plt.title("Original")

    plt.subplot(142), plt.imshow(mask,'gray')
    plt.title('Mask')

    plt.subplot(143), plt.imshow(masked_img, 'gray')
    plt.title('Masked image')


    ax=plt.subplot(144), plt.plot(hist_full), plt.plot(hist_mask)
    ax = plt.gca()
    ax.grid(True)
    plt.title('Histogram')
    plt.xlim([0,256])

    plt.suptitle('IMAGE HISTOGRAM',fontsize=18)
    plt.xlabel('Image:'+xfile,fontsize=18)
    plt.ylabel('All chanels',fontsize=10)
    plt.savefig(path+'Hist_cv2_'+xfile)   # Save Histograme Figure
    plt.show()
    return

# Test
#xfile = 'Copper_001.tif'
#print_cv_hist(path, xfile)
In [19]:
# https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_begins/py_histogram_begins.html
# Print histogram using Opencv and matplotlib

import cv2
import numpy as np
from matplotlib import pyplot as plt

def print_matplot_hist(path, xfile):
    file1 = path + xfile   
    print('Matplot Hist from file:', file1)
    
    # Read image
    img_mp = read_cv2_image(file1)
    if img_mp.any() == None:
        print("-->Unable to load image",file1)
    
    color = ('b','g','r')
    ax = plt.figure(figsize=(10,5))
    ax = plt.gca()
    ax.grid(True)
    
    for i,col in enumerate(color):
        histr = cv2.calcHist([img_mp],[i],None,[256],[0,256])
        plt.plot(histr,color = col, label='Band '+col.upper())
        plt.xlim([0,256])

    plt.title('Histogram of the image',fontsize=20)
    plt.xlabel('Image:'+xfile,fontsize=18)
    plt.ylabel('All chanels',fontsize=18)
    plt.legend(bbox_to_anchor=(.90,0.85),bbox_transform=plt.gcf().transFigure)
    plt.savefig(path+'Hist_'+xfile)   # Save Histograme Figure
    plt.show()   
        
    return

# Test
#xfile = 'Copper_1.tif'
#print_matplot_hist(path, xfile)
In [20]:
# Max and Min value from Histogram and each position
#l = np.array(hist_full).tolist()  - Transform array in a list

import cv2
import numpy as np
from matplotlib import pyplot as plt

def histogram_max_min(path, xfile):

    file1 = path+xfile
    print('Histogram analisys:', file1)
    
    # Read image
    imgh = read_cv2_image(file1)
    if imgh.any() == None:
        print("-->Unable to load image",file1)

    # Calculate histogram without mask
    hist_full = cv2.calcHist([imgh],[0],None,[256],[0,256])
 
    # Transform array in a list
    hist_list = np.array(hist_full).tolist()

    # Valor maximo e minimo do Histograma e sua posição
    val_max  = max(hist_list)
    xval_max = int(val_max[0])
 
    val_avg  =  max(hist_list) 
    xval_avg = int(val_avg[0]) / len(hist_list)
    xval_avg = int(xval_avg)
    
    val_min  = min(hist_list)
    xval_min = int(val_min[0])
    
    idx_max = hist_list.index(val_max)
    idx_min = hist_list.index(val_min)
    
    #print("Valor Max Histograma:", xval_max, '  Posição do valor Max:', idx_max)
    #print("Valor Min Histograma:", xval_min, '  Posição do valor Min:', idx_min)
    #print("Valor Avg Histograma:", xval_avg)
  
    return xval_max, idx_max, xval_min, idx_min

# Test
#xfile = 'Copper_001.tif'
#_,_,_,_ = histogram_max_min(path, xfile)
 
In [21]:
# Read image folder
import glob, os
def get_image_folder(xfile1):
    # Path to the image files
    path = currDir + "/" + folder + "/"
    # File
    file1 = path + xfile1
    print(file1)
    
    return file1
In [22]:
# Obtain percentage of channels R,G,B
import matplotlib.image as mpimg
def percent_rgb(path, xfile):
    print('    RGB percent from image:', xfile)
    emptyBlue = []
    emptyGreen= []
    emptyRed= []
    
    all_path = path + xfile
    # Read file
    img = mpimg.imread(all_path)
    imgplot = plt.imshow(img)
    # Mean of the array of each chanel
    RGBtuple = np.array(img).mean(axis=(0,1))

    averageRed = RGBtuple[0]
    averageGreen = RGBtuple[1]
    averageBlue = RGBtuple[2]

    percentageGreen = averageGreen/(averageRed+averageGreen+averageBlue) * 100
    percentageBlue = averageBlue/(averageRed+averageGreen+averageBlue) * 100
    percentageRed = averageRed/(averageRed+averageGreen+averageBlue) * 100

    emptyBlue+=[percentageBlue]
    emptyGreen+=[percentageGreen]
    emptyRed+=[percentageRed]
    print('     ------------------------------')
    print('     Percent Red',percentageRed)
    print('     Percent Green',percentageGreen)
    print('     Percent Blue',percentageBlue)
    print('     ------------------------------')
    return percentageRed, percentageGreen, percentageBlue
In [23]:
# Print all the informations from image, and create a pandas data frame with the relevant information

def print_file(path, xfile):
    print('------------------------------------------------------------------------')   
    file1 = path + xfile
    
    # Read image
    tif_f1 = read_pil_image(file1)
    if tif_f1 == None:
        print("-->Unable to load image",file1)

    print('Inf.File:',xfile)

    # Transform Image to array
    aArray = np.array(tif_f1)
    # Array sum  
    xsum = aArray.sum() / 1000000
    
    # Get channel 0
    x0_channel = channel(tif_f1, 0)
    aArray = np.array(x0_channel)
    xsum_0 = aArray.sum() / 1000000  

    # Get channel 1
    x1_channel = channel(tif_f1, 1)
    aArray = np.array(x1_channel)
    xsum_1 = aArray.sum() / 1000000  

    # Get channel 2
    x2_channel = channel(tif_f1, 2)
    aArray = np.array(x2_channel)
    xsum_2 = aArray.sum() / 1000000  

    # Histogram from image
    aHist = tif_f1.histogram()
    hsum = sum(aHist) / 100000

    # Histogram channel 0
    aHist_0 = x0_channel.histogram()
    hsum_0 = sum(aHist_0) / 100000

    # Histogram channel 1
    aHist_1 = x1_channel.histogram()
    hsum_1 = sum(aHist_1) / 100000

    # Histogram chanel 0
    aHist_2 = x2_channel.histogram()
    hsum_2 = sum(aHist_2) / 100000

    # number elements on list
    nlist = len(aHist)
    
    # Max and Min from Histogram
    xval_max, idx_max, xval_min, idx_min = histogram_max_min(path, xfile)
    
    # Percentage RGB
    perc_R, perc_G, perc_B = percent_rgb(path, xfile)

    # Get color
    # Enhancement Contrast color for better definition
    # f1_file has the file name saved enhanced  
    xvalue = 2.0  
    print('Enhancement color:', xfile, '  Value:',xvalue)  
    x_enh, f1_file = contrast(path, xfile, xvalue)

    # Remove Background - Put red background
    # f2_file has the file name saved masked
    
    # Only red Background for NON tif files
    #xend_file = file.endswith('*.TIF').upper()
    if file.endswith('*.TIF'):
        f2_file = f1_file
        img_masked = tif_f1
    else:    
        file1 = path+f1_file  
        print('Red background:', path, f1_file)   
        f2_file, img_masked = red_background(path, f1_file)

    # Get Main Color - 
    print('Most common color:', path, f2_file)  
    
    # most present color, RGB from most present color:
    # color name , Hex from rgb , list colors withour red, list colors without back, decimal list colors without back
    most_present, xrgb, xt_color_name, list_non_back,list_dec_back = get_main_color_without_red_and_floor(path, f2_file) 
    
    # HEX fom most present color
    hex_color  = rgb_to_hex(xrgb)
    
    # Decimal from most present color
    rgb_dec    = rgbToDecimal(xrgb)
    #----
    # Get Extrems of the image
    extr_a = tif_f1.getextrema() 
    # Transform tuple in a list    
    extr_b = [x for sets in extr_a for x in sets]
    # Sum the list  
    sum_list = sum(extr_b) 
    med_extr  = sum_list / len(extr_b)
    #print('List Extremes:',extr_a,'Sum:',sum_list,'Len:', len(extr_b), 'Med:',med_extr)


    # Obtain name file without extension 
    sample_name = os.path.basename(xfile).split('_')[0]

    # Print information  
    print(sample_name,' Size:',tif_f1.size, ' Format:',tif_f1.format, ' Mode:', tif_f1.mode)
    print('          Sum array:',xsum, ' Sum Ch 0:', xsum_0, ' Sum Ch 1:', xsum_1, ' Sum Ch 2:', xsum_2)      
    print('          Histog   :',hsum ,'  N.List elem:', nlist, ' Max:', xval_max, 'Idx Max:', idx_max, '  Min:', xval_min, 'Idx Min:', idx_min )
    print('          Color    :',xt_color_name,'   RGB   :',xrgb, '   Hex color:', hex_color,'  Dec Color:',rgb_dec)
    print('          Extremes :',extr_a, 'Med Extremes:',med_extr)
    print('          Percentage R:', perc_R,'  Percentage G:', perc_B, '  Percentage B:', perc_B)

    # insert information in a Pandas Data Frame
    df_image.append((folder, xfile, sample_name, tif_f1.size, tif_f1.format, tif_f1.mode , 
                       xsum, xsum_0, xsum_1, xsum_2, hsum, nlist, xt_color_name, xrgb, hex_color, 
                       rgb_dec, med_extr, xval_max, idx_max, xval_min, idx_min,
                       perc_R, perc_G, perc_B))
    
    return most_present, xrgb, xt_color_name, list_non_back, list_dec_back
 

Starting image analysis

In [24]:
# Timer
import datetime
master_time_start = datetime.datetime.now() # global timer start
In [25]:
# Create Data Frame with image information
df_image = []

xend_file = "*" + end_file
# change work to folder path
os.chdir(path)
print('Analysing Images from:',path, xend_file)

for file in glob.glob(xend_file):
    file_time_start = datetime.datetime.now() # timer start
    list_dec_back = list() # List with decimal colors in the image
    print(file)
    most_present, xrgb, xt_color_name, list_non_back, list_dec_back = print_file(path,file)
    file_time_end = datetime.datetime.now()
    elapsed = file_time_end - file_time_start
    print('File Start:', file_time_start, ' Finish:', file_time_end, '  File Time:',elapsed) # timer end
    
master_time_end = datetime.datetime.now() # global timer end
elapsed = master_time_end - master_time_start
print('Process Start:', master_time_start, ' Finish:', master_time_end, '  Global Time:',elapsed)
Analysing Images from: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ *.TIF
Aluminum_01.TIF
------------------------------------------------------------------------
Inf.File: Aluminum_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_01.TIF
    RGB percent from image: Aluminum_01.TIF
     ------------------------------
     Percent Red 34.04091712429833
     Percent Green 34.04091712429833
     Percent Blue 31.918165751403325
     ------------------------------
Enhancement color: Aluminum_01.TIF   Value: 2.0
   Enhance image: Aluminum_01.TIF   Value: 2.0
   Save enhanced file : Enh_Aluminum_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Aluminum_01.TIF
   Red background for image: Enh_Aluminum_01.TIF
   Save masked image with red background: Mask_Enh_Aluminum_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Aluminum_01.TIF
    Main color from image: Mask_Enh_Aluminum_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((234, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1), ((246, 227, 223), 1)]
      Read color name: (234, 229, 223)
      Main Color file: Mask_Enh_Aluminum_01.TIF  RGB: [((234, 229, 223), 1)] (234, 229, 223)  Color name: gainsboro  Hex: #eae5df
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 225.341887  Sum Ch 0: 76.708445  Sum Ch 1: 76.708445  Sum Ch 2: 71.924997
          Histog   : 94.37184   N.List elem: 768  Max: 251838 Idx Max: 9   Min: 0 Idx Min: 208
          Color    : gainsboro    RGB   : (234, 229, 223)    Hex color: #eae5df   Dec Color: 15394271
          Extremes : ((1, 218), (1, 218), (0, 218)) Med Extremes: 109.33333333333333
          Percentage R: 34.04091712429833   Percentage G: 31.918165751403325   Percentage B: 31.918165751403325
File Start: 2019-06-01 18:34:39.139760  Finish: 2019-06-01 18:34:53.218267   File Time: 0:00:14.078507
Aluminum_02.TIF
------------------------------------------------------------------------
Inf.File: Aluminum_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_02.TIF
    RGB percent from image: Aluminum_02.TIF
     ------------------------------
     Percent Red 33.995144701377555
     Percent Green 33.995144701377555
     Percent Blue 32.009710597244876
     ------------------------------
Enhancement color: Aluminum_02.TIF   Value: 2.0
   Enhance image: Aluminum_02.TIF   Value: 2.0
   Save enhanced file : Enh_Aluminum_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Aluminum_02.TIF
   Red background for image: Enh_Aluminum_02.TIF
   Save masked image with red background: Mask_Enh_Aluminum_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Aluminum_02.TIF
    Main color from image: Mask_Enh_Aluminum_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((232, 227, 223), 1), ((230, 227, 223), 1), ((228, 227, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Aluminum_02.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 232.768793  Sum Ch 0: 79.130088  Sum Ch 1: 79.130088  Sum Ch 2: 74.508617
          Histog   : 94.37184   N.List elem: 768  Max: 244041 Idx Max: 11   Min: 0 Idx Min: 211
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 212), (1, 212), (0, 211)) Med Extremes: 106.16666666666667
          Percentage R: 33.995144701377555   Percentage G: 32.009710597244876   Percentage B: 32.009710597244876
File Start: 2019-06-01 18:34:53.218267  Finish: 2019-06-01 18:35:07.965032   File Time: 0:00:14.746765
Aluminum_03.TIF
------------------------------------------------------------------------
Inf.File: Aluminum_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_03.TIF
    RGB percent from image: Aluminum_03.TIF
     ------------------------------
     Percent Red 33.884801040435796
     Percent Green 33.884801040435796
     Percent Blue 32.230397919128414
     ------------------------------
Enhancement color: Aluminum_03.TIF   Value: 2.0
   Enhance image: Aluminum_03.TIF   Value: 2.0
   Save enhanced file : Enh_Aluminum_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Aluminum_03.TIF
   Red background for image: Enh_Aluminum_03.TIF
   Save masked image with red background: Mask_Enh_Aluminum_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Aluminum_03.TIF
    Main color from image: Mask_Enh_Aluminum_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((234, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1), ((250, 228, 223), 1)]
      Read color name: (234, 229, 223)
      Main Color file: Mask_Enh_Aluminum_03.TIF  RGB: [((234, 229, 223), 1)] (234, 229, 223)  Color name: gainsboro  Hex: #eae5df
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 281.688117  Sum Ch 0: 95.449458  Sum Ch 1: 95.449458  Sum Ch 2: 90.789201
          Histog   : 94.37184   N.List elem: 768  Max: 246108 Idx Max: 11   Min: 0 Idx Min: 247
          Color    : gainsboro    RGB   : (234, 229, 223)    Hex color: #eae5df   Dec Color: 15394271
          Extremes : ((1, 251), (1, 251), (0, 250)) Med Extremes: 125.66666666666667
          Percentage R: 33.884801040435796   Percentage G: 32.230397919128414   Percentage B: 32.230397919128414
File Start: 2019-06-01 18:35:07.965032  Finish: 2019-06-01 18:35:22.570715   File Time: 0:00:14.605683
Aluminum_04.TIF
------------------------------------------------------------------------
Inf.File: Aluminum_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_04.TIF
    RGB percent from image: Aluminum_04.TIF
     ------------------------------
     Percent Red 33.8613375326682
     Percent Green 33.8613375326682
     Percent Blue 32.27732493466359
     ------------------------------
Enhancement color: Aluminum_04.TIF   Value: 2.0
   Enhance image: Aluminum_04.TIF   Value: 2.0
   Save enhanced file : Enh_Aluminum_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Aluminum_04.TIF
   Red background for image: Enh_Aluminum_04.TIF
   Save masked image with red background: Mask_Enh_Aluminum_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Aluminum_04.TIF
    Main color from image: Mask_Enh_Aluminum_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1), ((249, 228, 223), 1)]
      Read color name: (233, 229, 223)
      Main Color file: Mask_Enh_Aluminum_04.TIF  RGB: [((233, 229, 223), 1)] (233, 229, 223)  Color name: gainsboro  Hex: #e9e5df
Aluminum  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 294.870824  Sum Ch 0: 99.847205  Sum Ch 1: 99.847205  Sum Ch 2: 95.176414
          Histog   : 94.37184   N.List elem: 768  Max: 239672 Idx Max: 11   Min: 0 Idx Min: 255
          Color    : gainsboro    RGB   : (233, 229, 223)    Hex color: #e9e5df   Dec Color: 15328735
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.8613375326682   Percentage G: 32.27732493466359   Percentage B: 32.27732493466359
File Start: 2019-06-01 18:35:22.570715  Finish: 2019-06-01 18:35:39.289886   File Time: 0:00:16.719171
Brass_01.TIF
------------------------------------------------------------------------
Inf.File: Brass_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_01.TIF
    RGB percent from image: Brass_01.TIF
     ------------------------------
     Percent Red 34.701500933436115
     Percent Green 34.701500933436115
     Percent Blue 30.596998133127773
     ------------------------------
Enhancement color: Brass_01.TIF   Value: 2.0
   Enhance image: Brass_01.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_01.TIF
   Red background for image: Enh_Brass_01.TIF
   Save masked image with red background: Mask_Enh_Brass_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_01.TIF
    Main color from image: Mask_Enh_Brass_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((234, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1), ((242, 228, 223), 1)]
      Read color name: (234, 229, 223)
      Main Color file: Mask_Enh_Brass_01.TIF  RGB: [((234, 229, 223), 1)] (234, 229, 223)  Color name: gainsboro  Hex: #eae5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 115.591735  Sum Ch 0: 40.112067  Sum Ch 1: 40.112067  Sum Ch 2: 35.367601
          Histog   : 94.37184   N.List elem: 768  Max: 310755 Idx Max: 11   Min: 0 Idx Min: 218
          Color    : gainsboro    RGB   : (234, 229, 223)    Hex color: #eae5df   Dec Color: 15394271
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.701500933436115   Percentage G: 30.596998133127773   Percentage B: 30.596998133127773
File Start: 2019-06-01 18:35:39.290382  Finish: 2019-06-01 18:35:50.156256   File Time: 0:00:10.865874
Brass_02.TIF
------------------------------------------------------------------------
Inf.File: Brass_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_02.TIF
    RGB percent from image: Brass_02.TIF
     ------------------------------
     Percent Red 34.674108757050625
     Percent Green 34.674108757050625
     Percent Blue 30.65178248589875
     ------------------------------
Enhancement color: Brass_02.TIF   Value: 2.0
   Enhance image: Brass_02.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_02.TIF
   Red background for image: Enh_Brass_02.TIF
   Save masked image with red background: Mask_Enh_Brass_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_02.TIF
    Main color from image: Mask_Enh_Brass_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((248, 228, 223), 1), ((234, 227, 223), 1), ((228, 227, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Brass_02.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 115.114431  Sum Ch 0: 39.914903  Sum Ch 1: 39.914903  Sum Ch 2: 35.284625
          Histog   : 94.37184   N.List elem: 768  Max: 303759 Idx Max: 11   Min: 0 Idx Min: 252
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.674108757050625   Percentage G: 30.65178248589875   Percentage B: 30.65178248589875
File Start: 2019-06-01 18:35:50.156256  Finish: 2019-06-01 18:36:00.921842   File Time: 0:00:10.765586
Brass_04.TIF
------------------------------------------------------------------------
Inf.File: Brass_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_04.TIF
    RGB percent from image: Brass_04.TIF
     ------------------------------
     Percent Red 34.69477478971919
     Percent Green 34.69477478971919
     Percent Blue 30.61045042056161
     ------------------------------
Enhancement color: Brass_04.TIF   Value: 2.0
   Enhance image: Brass_04.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_04.TIF
   Red background for image: Enh_Brass_04.TIF
   Save masked image with red background: Mask_Enh_Brass_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_04.TIF
    Main color from image: Mask_Enh_Brass_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((255, 228, 223), 1), ((250, 227, 223), 1), ((236, 227, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Brass_04.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 112.513003  Sum Ch 0: 39.036133  Sum Ch 1: 39.036133  Sum Ch 2: 34.440737
          Histog   : 94.37184   N.List elem: 768  Max: 303654 Idx Max: 10   Min: 0 Idx Min: 254
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.69477478971919   Percentage G: 30.61045042056161   Percentage B: 30.61045042056161
File Start: 2019-06-01 18:36:00.922336  Finish: 2019-06-01 18:36:10.014328   File Time: 0:00:09.091992
Brass_05.TIF
------------------------------------------------------------------------
Inf.File: Brass_05.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_05.TIF
    RGB percent from image: Brass_05.TIF
     ------------------------------
     Percent Red 34.71149162712858
     Percent Green 34.71149162712858
     Percent Blue 30.577016745742835
     ------------------------------
Enhancement color: Brass_05.TIF   Value: 2.0
   Enhance image: Brass_05.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_05.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_05.TIF
   Red background for image: Enh_Brass_05.TIF
   Save masked image with red background: Mask_Enh_Brass_05.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_05.TIF
    Main color from image: Mask_Enh_Brass_05.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((232, 229, 223), 1), ((230, 229, 223), 1), ((242, 228, 223), 1), ((252, 227, 223), 1)]
      Read color name: (232, 229, 223)
      Main Color file: Mask_Enh_Brass_05.TIF  RGB: [((232, 229, 223), 1)] (232, 229, 223)  Color name: gainsboro  Hex: #e8e5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 115.000094  Sum Ch 0: 39.918248  Sum Ch 1: 39.918248  Sum Ch 2: 35.163598
          Histog   : 94.37184   N.List elem: 768  Max: 304881 Idx Max: 11   Min: 0 Idx Min: 247
          Color    : gainsboro    RGB   : (232, 229, 223)    Hex color: #e8e5df   Dec Color: 15263199
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.71149162712858   Percentage G: 30.577016745742835   Percentage B: 30.577016745742835
File Start: 2019-06-01 18:36:10.014328  Finish: 2019-06-01 18:36:20.479397   File Time: 0:00:10.465069
Brass_06.TIF
------------------------------------------------------------------------
Inf.File: Brass_06.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_06.TIF
    RGB percent from image: Brass_06.TIF
     ------------------------------
     Percent Red 34.57756347141397
     Percent Green 34.57756347141397
     Percent Blue 30.844873057172066
     ------------------------------
Enhancement color: Brass_06.TIF   Value: 2.0
   Enhance image: Brass_06.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_06.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_06.TIF
   Red background for image: Enh_Brass_06.TIF
   Save masked image with red background: Mask_Enh_Brass_06.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_06.TIF
    Main color from image: Mask_Enh_Brass_06.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((249, 227, 223), 1), ((229, 227, 223), 1), ((227, 227, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_Brass_06.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 124.310095  Sum Ch 0: 42.983402  Sum Ch 1: 42.983402  Sum Ch 2: 38.343291
          Histog   : 94.37184   N.List elem: 768  Max: 317338 Idx Max: 11   Min: 0 Idx Min: 225
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.57756347141397   Percentage G: 30.844873057172066   Percentage B: 30.844873057172066
File Start: 2019-06-01 18:36:20.479894  Finish: 2019-06-01 18:36:29.228680   File Time: 0:00:08.748786
Brass_07.TIF
------------------------------------------------------------------------
Inf.File: Brass_07.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_07.TIF
    RGB percent from image: Brass_07.TIF
     ------------------------------
     Percent Red 34.63483992657567
     Percent Green 34.63483992657567
     Percent Blue 30.730320146848655
     ------------------------------
Enhancement color: Brass_07.TIF   Value: 2.0
   Enhance image: Brass_07.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_07.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_07.TIF
   Red background for image: Enh_Brass_07.TIF
   Save masked image with red background: Mask_Enh_Brass_07.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_07.TIF
    Main color from image: Mask_Enh_Brass_07.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((235, 229, 223), 1), ((229, 229, 223), 1), ((235, 227, 223), 1), ((227, 227, 223), 1)]
      Read color name: (235, 229, 223)
      Main Color file: Mask_Enh_Brass_07.TIF  RGB: [((235, 229, 223), 1)] (235, 229, 223)  Color name: gainsboro  Hex: #ebe5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 122.271733  Sum Ch 0: 42.348619  Sum Ch 1: 42.348619  Sum Ch 2: 37.574495
          Histog   : 94.37184   N.List elem: 768  Max: 318513 Idx Max: 12   Min: 0 Idx Min: 202
          Color    : gainsboro    RGB   : (235, 229, 223)    Hex color: #ebe5df   Dec Color: 15459807
          Extremes : ((1, 221), (1, 221), (0, 219)) Med Extremes: 110.5
          Percentage R: 34.63483992657567   Percentage G: 30.730320146848655   Percentage B: 30.730320146848655
File Start: 2019-06-01 18:36:29.228680  Finish: 2019-06-01 18:36:38.198430   File Time: 0:00:08.969750
Brass_08.TIF
------------------------------------------------------------------------
Inf.File: Brass_08.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_08.TIF
    RGB percent from image: Brass_08.TIF
     ------------------------------
     Percent Red 34.578000313845045
     Percent Green 34.578000313845045
     Percent Blue 30.843999372309906
     ------------------------------
Enhancement color: Brass_08.TIF   Value: 2.0
   Enhance image: Brass_08.TIF   Value: 2.0
   Save enhanced file : Enh_Brass_08.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Brass_08.TIF
   Red background for image: Enh_Brass_08.TIF
   Save masked image with red background: Mask_Enh_Brass_08.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Brass_08.TIF
    Main color from image: Mask_Enh_Brass_08.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((227, 227, 223), 1), ((225, 225, 223), 1), ((255, 223, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_Brass_08.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
Brass  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 124.488185  Sum Ch 0: 43.045525  Sum Ch 1: 43.045525  Sum Ch 2: 38.397135
          Histog   : 94.37184   N.List elem: 768  Max: 320231 Idx Max: 11   Min: 0 Idx Min: 206
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 220), (1, 220), (0, 217)) Med Extremes: 109.83333333333333
          Percentage R: 34.578000313845045   Percentage G: 30.843999372309906   Percentage B: 30.843999372309906
File Start: 2019-06-01 18:36:38.198934  Finish: 2019-06-01 18:36:47.323715   File Time: 0:00:09.124781
CopperWire_01.TIF
------------------------------------------------------------------------
Inf.File: CopperWire_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_01.TIF
    RGB percent from image: CopperWire_01.TIF
     ------------------------------
     Percent Red 34.24620691364302
     Percent Green 34.24620691364302
     Percent Blue 31.507586172713953
     ------------------------------
Enhancement color: CopperWire_01.TIF   Value: 2.0
   Enhance image: CopperWire_01.TIF   Value: 2.0
   Save enhanced file : Enh_CopperWire_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_CopperWire_01.TIF
   Red background for image: Enh_CopperWire_01.TIF
   Save masked image with red background: Mask_Enh_CopperWire_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_CopperWire_01.TIF
    Main color from image: Mask_Enh_CopperWire_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((227, 227, 223), 1), ((225, 225, 223), 1), ((223, 223, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_CopperWire_01.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 165.883977  Sum Ch 0: 56.80897  Sum Ch 1: 56.80897  Sum Ch 2: 52.266037
          Histog   : 94.37184   N.List elem: 768  Max: 327884 Idx Max: 10   Min: 0 Idx Min: 156
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 157), (1, 157), (0, 156)) Med Extremes: 78.66666666666667
          Percentage R: 34.24620691364302   Percentage G: 31.507586172713953   Percentage B: 31.507586172713953
File Start: 2019-06-01 18:36:47.323715  Finish: 2019-06-01 18:36:51.954436   File Time: 0:00:04.630721
CopperWire_02.TIF
------------------------------------------------------------------------
Inf.File: CopperWire_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_02.TIF
    RGB percent from image: CopperWire_02.TIF
     ------------------------------
     Percent Red 34.18076444353842
     Percent Green 34.18076444353842
     Percent Blue 31.63847111292316
     ------------------------------
Enhancement color: CopperWire_02.TIF   Value: 2.0
   Enhance image: CopperWire_02.TIF   Value: 2.0
   Save enhanced file : Enh_CopperWire_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_CopperWire_02.TIF
   Red background for image: Enh_CopperWire_02.TIF
   Save masked image with red background: Mask_Enh_CopperWire_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_CopperWire_02.TIF
    Main color from image: Mask_Enh_CopperWire_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((227, 227, 223), 1), ((225, 225, 223), 1), ((223, 223, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_CopperWire_02.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 181.932704  Sum Ch 0: 62.185989  Sum Ch 1: 62.185989  Sum Ch 2: 57.560726
          Histog   : 94.37184   N.List elem: 768  Max: 303195 Idx Max: 9   Min: 0 Idx Min: 156
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 157), (1, 157), (0, 156)) Med Extremes: 78.66666666666667
          Percentage R: 34.18076444353842   Percentage G: 31.63847111292316   Percentage B: 31.63847111292316
File Start: 2019-06-01 18:36:51.954931  Finish: 2019-06-01 18:36:57.225071   File Time: 0:00:05.270140
CopperWire_03.TIF
------------------------------------------------------------------------
Inf.File: CopperWire_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_03.TIF
    RGB percent from image: CopperWire_03.TIF
     ------------------------------
     Percent Red 34.09631955546054
     Percent Green 34.09631955546054
     Percent Blue 31.807360889078918
     ------------------------------
Enhancement color: CopperWire_03.TIF   Value: 2.0
   Enhance image: CopperWire_03.TIF   Value: 2.0
   Save enhanced file : Enh_CopperWire_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_CopperWire_03.TIF
   Red background for image: Enh_CopperWire_03.TIF
   Save masked image with red background: Mask_Enh_CopperWire_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_CopperWire_03.TIF
    Main color from image: Mask_Enh_CopperWire_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((227, 227, 223), 1), ((225, 225, 223), 1), ((223, 223, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_CopperWire_03.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 202.037768  Sum Ch 0: 68.887443  Sum Ch 1: 68.887443  Sum Ch 2: 64.262882
          Histog   : 94.37184   N.List elem: 768  Max: 295451 Idx Max: 9   Min: 0 Idx Min: 157
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 160), (1, 160), (0, 159)) Med Extremes: 80.16666666666667
          Percentage R: 34.09631955546054   Percentage G: 31.807360889078918   Percentage B: 31.807360889078918
File Start: 2019-06-01 18:36:57.225567  Finish: 2019-06-01 18:37:02.698830   File Time: 0:00:05.473263
CopperWire_04.TIF
------------------------------------------------------------------------
Inf.File: CopperWire_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_04.TIF
    RGB percent from image: CopperWire_04.TIF
     ------------------------------
     Percent Red 33.62690185419207
     Percent Green 33.62690185419207
     Percent Blue 32.74619629161587
     ------------------------------
Enhancement color: CopperWire_04.TIF   Value: 2.0
   Enhance image: CopperWire_04.TIF   Value: 2.0
   Save enhanced file : Enh_CopperWire_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_CopperWire_04.TIF
   Red background for image: Enh_CopperWire_04.TIF
   Save masked image with red background: Mask_Enh_CopperWire_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_CopperWire_04.TIF
    Main color from image: Mask_Enh_CopperWire_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((169, 165, 159), 1), ((166, 165, 159), 1), ((172, 164, 159), 1), ((166, 164, 159), 1)]
      Read color name: (169, 165, 159)
      Main Color file: Mask_Enh_CopperWire_04.TIF  RGB: [((169, 165, 159), 1)] (169, 165, 159)  Color name: darkgray  Hex: #a9a59f
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 531.395758  Sum Ch 0: 178.69193  Sum Ch 1: 178.69193  Sum Ch 2: 174.011898
          Histog   : 94.37184   N.List elem: 768  Max: 92231 Idx Max: 9   Min: 0 Idx Min: 131
          Color    : darkgray    RGB   : (169, 165, 159)    Hex color: #a9a59f   Dec Color: 11117983
          Extremes : ((1, 145), (1, 145), (0, 143)) Med Extremes: 72.5
          Percentage R: 33.62690185419207   Percentage G: 32.74619629161587   Percentage B: 32.74619629161587
File Start: 2019-06-01 18:37:02.698830  Finish: 2019-06-01 18:37:15.618268   File Time: 0:00:12.919438
CopperWire_05.TIF
------------------------------------------------------------------------
Inf.File: CopperWire_05.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_05.TIF
    RGB percent from image: CopperWire_05.TIF
     ------------------------------
     Percent Red 33.6250288890892
     Percent Green 33.6250288890892
     Percent Blue 32.749942221821605
     ------------------------------
Enhancement color: CopperWire_05.TIF   Value: 2.0
   Enhance image: CopperWire_05.TIF   Value: 2.0
   Save enhanced file : Enh_CopperWire_05.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_CopperWire_05.TIF
   Red background for image: Enh_CopperWire_05.TIF
   Save masked image with red background: Mask_Enh_CopperWire_05.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_CopperWire_05.TIF
    Main color from image: Mask_Enh_CopperWire_05.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((169, 165, 159), 1), ((166, 165, 159), 1), ((172, 164, 159), 1), ((166, 164, 159), 1)]
      Read color name: (169, 165, 159)
      Main Color file: Mask_Enh_CopperWire_05.TIF  RGB: [((169, 165, 159), 1)] (169, 165, 159)  Color name: darkgray  Hex: #a9a59f
CopperWire  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 535.292923  Sum Ch 0: 179.9924  Sum Ch 1: 179.9924  Sum Ch 2: 175.308123
          Histog   : 94.37184   N.List elem: 768  Max: 85458 Idx Max: 9   Min: 0 Idx Min: 131
          Color    : darkgray    RGB   : (169, 165, 159)    Hex color: #a9a59f   Dec Color: 11117983
          Extremes : ((1, 151), (1, 151), (0, 148)) Med Extremes: 75.33333333333333
          Percentage R: 33.6250288890892   Percentage G: 32.749942221821605   Percentage B: 32.749942221821605
File Start: 2019-06-01 18:37:15.620249  Finish: 2019-06-01 18:37:29.856958   File Time: 0:00:14.236709
Copper_01.TIF
------------------------------------------------------------------------
Inf.File: Copper_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_01.TIF
    RGB percent from image: Copper_01.TIF
     ------------------------------
     Percent Red 34.36707022525294
     Percent Green 34.36707022525294
     Percent Blue 31.265859549494124
     ------------------------------
Enhancement color: Copper_01.TIF   Value: 2.0
   Enhance image: Copper_01.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_01.TIF
   Red background for image: Enh_Copper_01.TIF
   Save masked image with red background: Mask_Enh_Copper_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_01.TIF
    Main color from image: Mask_Enh_Copper_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((227, 227, 223), 1), ((227, 225, 223), 1), ((225, 225, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_Copper_01.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 147.616898  Sum Ch 0: 50.731603  Sum Ch 1: 50.731603  Sum Ch 2: 46.153692
          Histog   : 94.37184   N.List elem: 768  Max: 318670 Idx Max: 9   Min: 0 Idx Min: 153
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 169), (1, 169), (0, 169)) Med Extremes: 84.83333333333333
          Percentage R: 34.36707022525294   Percentage G: 31.265859549494124   Percentage B: 31.265859549494124
File Start: 2019-06-01 18:37:29.856958  Finish: 2019-06-01 18:37:39.414741   File Time: 0:00:09.557783
Copper_02.TIF
------------------------------------------------------------------------
Inf.File: Copper_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_02.TIF
    RGB percent from image: Copper_02.TIF
     ------------------------------
     Percent Red 34.458785430151
     Percent Green 34.458785430151
     Percent Blue 31.082429139698004
     ------------------------------
Enhancement color: Copper_02.TIF   Value: 2.0
   Enhance image: Copper_02.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_02.TIF
   Red background for image: Enh_Copper_02.TIF
   Save masked image with red background: Mask_Enh_Copper_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_02.TIF
    Main color from image: Mask_Enh_Copper_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((231, 229, 223), 1), ((229, 229, 223), 1), ((229, 227, 223), 1), ((227, 227, 223), 1)]
      Read color name: (231, 229, 223)
      Main Color file: Mask_Enh_Copper_02.TIF  RGB: [((231, 229, 223), 1)] (231, 229, 223)  Color name: gainsboro  Hex: #e7e5df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 142.227555  Sum Ch 0: 49.009888  Sum Ch 1: 49.009888  Sum Ch 2: 44.207779
          Histog   : 94.37184   N.List elem: 768  Max: 321043 Idx Max: 10   Min: 0 Idx Min: 160
          Color    : gainsboro    RGB   : (231, 229, 223)    Hex color: #e7e5df   Dec Color: 15197663
          Extremes : ((1, 179), (1, 179), (0, 179)) Med Extremes: 89.83333333333333
          Percentage R: 34.458785430151   Percentage G: 31.082429139698004   Percentage B: 31.082429139698004
File Start: 2019-06-01 18:37:39.415236  Finish: 2019-06-01 18:37:49.562476   File Time: 0:00:10.147240
Copper_03.TIF
------------------------------------------------------------------------
Inf.File: Copper_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_03.TIF
    RGB percent from image: Copper_03.TIF
     ------------------------------
     Percent Red 34.555104993905275
     Percent Green 34.555104993905275
     Percent Blue 30.88979001218945
     ------------------------------
Enhancement color: Copper_03.TIF   Value: 2.0
   Enhance image: Copper_03.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_03.TIF
   Red background for image: Enh_Copper_03.TIF
   Save masked image with red background: Mask_Enh_Copper_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_03.TIF
    Main color from image: Mask_Enh_Copper_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((228, 227, 223), 1), ((250, 226, 223), 1), ((228, 225, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Copper_03.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 130.53091  Sum Ch 0: 45.105093  Sum Ch 1: 45.105093  Sum Ch 2: 40.320724
          Histog   : 94.37184   N.List elem: 768  Max: 309376 Idx Max: 11   Min: 0 Idx Min: 162
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 168), (1, 168), (0, 166)) Med Extremes: 84.0
          Percentage R: 34.555104993905275   Percentage G: 30.88979001218945   Percentage B: 30.88979001218945
File Start: 2019-06-01 18:37:49.562972  Finish: 2019-06-01 18:37:58.319102   File Time: 0:00:08.756130
Copper_04.TIF
------------------------------------------------------------------------
Inf.File: Copper_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_04.TIF
    RGB percent from image: Copper_04.TIF
     ------------------------------
     Percent Red 34.31395400967227
     Percent Green 34.31395400967227
     Percent Blue 31.372091980655455
     ------------------------------
Enhancement color: Copper_04.TIF   Value: 2.0
   Enhance image: Copper_04.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_04.TIF
   Red background for image: Enh_Copper_04.TIF
   Save masked image with red background: Mask_Enh_Copper_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_04.TIF
    Main color from image: Mask_Enh_Copper_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((229, 229, 223), 1), ((227, 227, 223), 1), ((225, 225, 223), 1), ((223, 223, 223), 1)]
      Read color name: (229, 229, 223)
      Main Color file: Mask_Enh_Copper_04.TIF  RGB: [((229, 229, 223), 1)] (229, 229, 223)  Color name: gainsboro  Hex: #e5e5df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 163.031541  Sum Ch 0: 55.942568  Sum Ch 1: 55.942568  Sum Ch 2: 51.146405
          Histog   : 94.37184   N.List elem: 768  Max: 322371 Idx Max: 10   Min: 0 Idx Min: 155
          Color    : gainsboro    RGB   : (229, 229, 223)    Hex color: #e5e5df   Dec Color: 15066591
          Extremes : ((1, 156), (1, 156), (0, 155)) Med Extremes: 78.16666666666667
          Percentage R: 34.31395400967227   Percentage G: 31.372091980655455   Percentage B: 31.372091980655455
File Start: 2019-06-01 18:37:58.319102  Finish: 2019-06-01 18:38:05.757227   File Time: 0:00:07.438125
Copper_05.TIF
------------------------------------------------------------------------
Inf.File: Copper_05.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_05.TIF
    RGB percent from image: Copper_05.TIF
     ------------------------------
     Percent Red 34.358227085310126
     Percent Green 34.358227085310126
     Percent Blue 31.283545829379744
     ------------------------------
Enhancement color: Copper_05.TIF   Value: 2.0
   Enhance image: Copper_05.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_05.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_05.TIF
   Red background for image: Enh_Copper_05.TIF
   Save masked image with red background: Mask_Enh_Copper_05.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_05.TIF
    Main color from image: Mask_Enh_Copper_05.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((228, 227, 223), 1), ((226, 225, 223), 1), ((224, 223, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Copper_05.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 156.115532  Sum Ch 0: 53.638529  Sum Ch 1: 53.638529  Sum Ch 2: 48.838474
          Histog   : 94.37184   N.List elem: 768  Max: 329941 Idx Max: 10   Min: 0 Idx Min: 155
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 156), (1, 156), (0, 155)) Med Extremes: 78.16666666666667
          Percentage R: 34.358227085310126   Percentage G: 31.283545829379744   Percentage B: 31.283545829379744
File Start: 2019-06-01 18:38:05.757227  Finish: 2019-06-01 18:38:13.870137   File Time: 0:00:08.112910
Copper_06.TIF
------------------------------------------------------------------------
Inf.File: Copper_06.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_06.TIF
    RGB percent from image: Copper_06.TIF
     ------------------------------
     Percent Red 34.49952240739727
     Percent Green 34.49952240739727
     Percent Blue 31.00095518520546
     ------------------------------
Enhancement color: Copper_06.TIF   Value: 2.0
   Enhance image: Copper_06.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_06.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_06.TIF
   Red background for image: Enh_Copper_06.TIF
   Save masked image with red background: Mask_Enh_Copper_06.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_06.TIF
    Main color from image: Mask_Enh_Copper_06.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((228, 227, 223), 1), ((226, 225, 223), 1), ((224, 223, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Copper_06.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 137.346139  Sum Ch 0: 47.383762  Sum Ch 1: 47.383762  Sum Ch 2: 42.578615
          Histog   : 94.37184   N.List elem: 768  Max: 340247 Idx Max: 10   Min: 0 Idx Min: 153
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 154), (1, 154), (0, 153)) Med Extremes: 77.16666666666667
          Percentage R: 34.49952240739727   Percentage G: 31.00095518520546   Percentage B: 31.00095518520546
File Start: 2019-06-01 18:38:13.870137  Finish: 2019-06-01 18:38:22.926236   File Time: 0:00:09.056099
Copper_07.TIF
------------------------------------------------------------------------
Inf.File: Copper_07.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_07.TIF
    RGB percent from image: Copper_07.TIF
     ------------------------------
     Percent Red 34.65537597413545
     Percent Green 34.65537597413545
     Percent Blue 30.689248051729106
     ------------------------------
Enhancement color: Copper_07.TIF   Value: 2.0
   Enhance image: Copper_07.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_07.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_07.TIF
   Red background for image: Enh_Copper_07.TIF
   Save masked image with red background: Mask_Enh_Copper_07.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_07.TIF
    Main color from image: Mask_Enh_Copper_07.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((198, 197, 191), 1), ((239, 195, 191), 1), ((194, 191, 191), 1), ((166, 165, 159), 1)]
      Read color name: (198, 197, 191)
      Main Color file: Mask_Enh_Copper_07.TIF  RGB: [((198, 197, 191), 1)] (198, 197, 191)  Color name: silver  Hex: #c6c5bf
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 119.949182  Sum Ch 0: 41.56884  Sum Ch 1: 41.56884  Sum Ch 2: 36.811502
          Histog   : 94.37184   N.List elem: 768  Max: 303151 Idx Max: 11   Min: 0 Idx Min: 131
          Color    : silver    RGB   : (198, 197, 191)    Hex color: #c6c5bf   Dec Color: 13026751
          Extremes : ((1, 171), (1, 171), (0, 168)) Med Extremes: 85.33333333333333
          Percentage R: 34.65537597413545   Percentage G: 30.689248051729106   Percentage B: 30.689248051729106
File Start: 2019-06-01 18:38:22.926732  Finish: 2019-06-01 18:38:33.027958   File Time: 0:00:10.101226
Copper_08.TIF
------------------------------------------------------------------------
Inf.File: Copper_08.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_08.TIF
    RGB percent from image: Copper_08.TIF
     ------------------------------
     Percent Red 34.659485305146184
     Percent Green 34.659485305146184
     Percent Blue 30.681029389707636
     ------------------------------
Enhancement color: Copper_08.TIF   Value: 2.0
   Enhance image: Copper_08.TIF   Value: 2.0
   Save enhanced file : Enh_Copper_08.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Copper_08.TIF
   Red background for image: Enh_Copper_08.TIF
   Save masked image with red background: Mask_Enh_Copper_08.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Copper_08.TIF
    Main color from image: Mask_Enh_Copper_08.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((228, 227, 223), 1), ((255, 223, 223), 1), ((224, 223, 223), 1), ((198, 197, 191), 1)]
      Read color name: (228, 227, 223)
      Main Color file: Mask_Enh_Copper_08.TIF  RGB: [((228, 227, 223), 1)] (228, 227, 223)  Color name: gainsboro  Hex: #e4e3df
Copper  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 119.562843  Sum Ch 0: 41.439866  Sum Ch 1: 41.439866  Sum Ch 2: 36.683111
          Histog   : 94.37184   N.List elem: 768  Max: 305393 Idx Max: 9   Min: 0 Idx Min: 131
          Color    : gainsboro    RGB   : (228, 227, 223)    Hex color: #e4e3df   Dec Color: 15000543
          Extremes : ((1, 183), (1, 183), (0, 182)) Med Extremes: 91.66666666666667
          Percentage R: 34.659485305146184   Percentage G: 30.681029389707636   Percentage B: 30.681029389707636
File Start: 2019-06-01 18:38:33.027958  Finish: 2019-06-01 18:38:42.135051   File Time: 0:00:09.107093
Enh_Aluminum_01.TIF
------------------------------------------------------------------------
Inf.File: Enh_Aluminum_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Enh_Aluminum_01.TIF
    RGB percent from image: Enh_Aluminum_01.TIF
     ------------------------------
     Percent Red 33.7429237876734
     Percent Green 33.7429237876734
     Percent Blue 32.51415242465321
     ------------------------------
Enhancement color: Enh_Aluminum_01.TIF   Value: 2.0
   Enhance image: Enh_Aluminum_01.TIF   Value: 2.0
   Save enhanced file : Enh_Enh_Aluminum_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Enh_Aluminum_01.TIF
   Red background for image: Enh_Enh_Aluminum_01.TIF
   Save masked image with red background: Mask_Enh_Enh_Aluminum_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Enh_Aluminum_01.TIF
    Main color from image: Mask_Enh_Enh_Aluminum_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 235, 223), 1), ((243, 235, 223), 1), ((239, 235, 223), 1), ((235, 235, 223), 1)]
      Read color name: (255, 235, 223)
      Main Color file: Mask_Enh_Enh_Aluminum_01.TIF  RGB: [((255, 235, 223), 1)] (255, 235, 223)  Color name: mistyrose  Hex: #ffebdf
Enh  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 270.569538  Sum Ch 0: 91.298073  Sum Ch 1: 91.298073  Sum Ch 2: 87.973392
          Histog   : 94.37184   N.List elem: 768  Max: 2209745 Idx Max: 0   Min: 0 Idx Min: 1
          Color    : mistyrose    RGB   : (255, 235, 223)    Hex color: #ffebdf   Dec Color: 16772063
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 33.7429237876734   Percentage G: 32.51415242465321   Percentage B: 32.51415242465321
File Start: 2019-06-01 18:38:42.135051  Finish: 2019-06-01 18:38:52.332315   File Time: 0:00:10.197264
Enh_Aluminum_02.TIF
------------------------------------------------------------------------
Inf.File: Enh_Aluminum_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Enh_Aluminum_02.TIF
    RGB percent from image: Enh_Aluminum_02.TIF
     ------------------------------
     Percent Red 33.78060182471601
     Percent Green 33.78060182471601
     Percent Blue 32.438796350567976
     ------------------------------
Enhancement color: Enh_Aluminum_02.TIF   Value: 2.0
   Enhance image: Enh_Aluminum_02.TIF   Value: 2.0
   Save enhanced file : Enh_Enh_Aluminum_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Enh_Aluminum_02.TIF
   Red background for image: Enh_Enh_Aluminum_02.TIF
   Save masked image with red background: Mask_Enh_Enh_Aluminum_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Enh_Aluminum_02.TIF
    Main color from image: Mask_Enh_Enh_Aluminum_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((242, 235, 223), 1), ((238, 235, 223), 1), ((254, 234, 223), 1), ((250, 234, 223), 1)]
      Read color name: (242, 235, 223)
      Main Color file: Mask_Enh_Enh_Aluminum_02.TIF  RGB: [((242, 235, 223), 1)] (242, 235, 223)  Color name: beige  Hex: #f2ebdf
Enh  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 279.243234  Sum Ch 0: 94.330045  Sum Ch 1: 94.330045  Sum Ch 2: 90.583144
          Histog   : 94.37184   N.List elem: 768  Max: 1985670 Idx Max: 0   Min: 0 Idx Min: 1
          Color    : beige    RGB   : (242, 235, 223)    Hex color: #f2ebdf   Dec Color: 15920095
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 33.78060182471601   Percentage G: 32.438796350567976   Percentage B: 32.438796350567976
File Start: 2019-06-01 18:38:52.332315  Finish: 2019-06-01 18:39:02.838381   File Time: 0:00:10.506066
Enh_Aluminum_03.TIF
------------------------------------------------------------------------
Inf.File: Enh_Aluminum_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Enh_Aluminum_03.TIF
    RGB percent from image: Enh_Aluminum_03.TIF
     ------------------------------
     Percent Red 33.573867165410206
     Percent Green 33.573867165410206
     Percent Blue 32.852265669179594
     ------------------------------
Enhancement color: Enh_Aluminum_03.TIF   Value: 2.0
   Enhance image: Enh_Aluminum_03.TIF   Value: 2.0
   Save enhanced file : Enh_Enh_Aluminum_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Enh_Aluminum_03.TIF
   Red background for image: Enh_Enh_Aluminum_03.TIF
   Save masked image with red background: Mask_Enh_Enh_Aluminum_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Enh_Aluminum_03.TIF
    Main color from image: Mask_Enh_Enh_Aluminum_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((243, 235, 223), 1), ((239, 235, 223), 1), ((235, 235, 223), 1), ((255, 234, 223), 1)]
      Read color name: (243, 235, 223)
      Main Color file: Mask_Enh_Enh_Aluminum_03.TIF  RGB: [((243, 235, 223), 1)] (243, 235, 223)  Color name: beige  Hex: #f3ebdf
Enh  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 348.837137  Sum Ch 0: 117.118117  Sum Ch 1: 117.118117  Sum Ch 2: 114.600903
          Histog   : 94.37184   N.List elem: 768  Max: 2307529 Idx Max: 0   Min: 0 Idx Min: 1
          Color    : beige    RGB   : (243, 235, 223)    Hex color: #f3ebdf   Dec Color: 15985631
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 33.573867165410206   Percentage G: 32.852265669179594   Percentage B: 32.852265669179594
File Start: 2019-06-01 18:39:02.838876  Finish: 2019-06-01 18:39:12.869485   File Time: 0:00:10.030609
Enh_Aluminum_04.TIF
------------------------------------------------------------------------
Inf.File: Enh_Aluminum_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Enh_Aluminum_04.TIF
    RGB percent from image: Enh_Aluminum_04.TIF
     ------------------------------
     Percent Red 33.5718257571785
     Percent Green 33.5718257571785
     Percent Blue 32.856348485643
     ------------------------------
Enhancement color: Enh_Aluminum_04.TIF   Value: 2.0
   Enhance image: Enh_Aluminum_04.TIF   Value: 2.0
   Save enhanced file : Enh_Enh_Aluminum_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Enh_Aluminum_04.TIF
   Red background for image: Enh_Enh_Aluminum_04.TIF
   Save masked image with red background: Mask_Enh_Enh_Aluminum_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Enh_Aluminum_04.TIF
    Main color from image: Mask_Enh_Enh_Aluminum_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((239, 235, 223), 1), ((235, 235, 223), 1), ((255, 234, 223), 1), ((251, 234, 223), 1)]
      Read color name: (239, 235, 223)
      Main Color file: Mask_Enh_Enh_Aluminum_04.TIF  RGB: [((239, 235, 223), 1)] (239, 235, 223)  Color name: beige  Hex: #efebdf
Enh  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 366.798514  Sum Ch 0: 123.140958  Sum Ch 1: 123.140958  Sum Ch 2: 120.516598
          Histog   : 94.37184   N.List elem: 768  Max: 2225598 Idx Max: 0   Min: 0 Idx Min: 2
          Color    : beige    RGB   : (239, 235, 223)    Hex color: #efebdf   Dec Color: 15723487
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 33.5718257571785   Percentage G: 32.856348485643   Percentage B: 32.856348485643
File Start: 2019-06-01 18:39:12.869982  Finish: 2019-06-01 18:39:24.933423   File Time: 0:00:12.063441
Enh_Brass_01.TIF
------------------------------------------------------------------------
Inf.File: Enh_Brass_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Enh_Brass_01.TIF
    RGB percent from image: Enh_Brass_01.TIF
     ------------------------------
     Percent Red 35.4333735885169
     Percent Green 35.4333735885169
     Percent Blue 29.133252822966192
     ------------------------------
Enhancement color: Enh_Brass_01.TIF   Value: 2.0
   Enhance image: Enh_Brass_01.TIF   Value: 2.0
   Save enhanced file : Enh_Enh_Brass_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Enh_Brass_01.TIF
   Red background for image: Enh_Enh_Brass_01.TIF
   Save masked image with red background: Mask_Enh_Enh_Brass_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Enh_Brass_01.TIF
    Main color from image: Mask_Enh_Enh_Brass_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((243, 235, 223), 1), ((239, 235, 223), 1), ((235, 235, 223), 1), ((247, 231, 223), 1)]
      Read color name: (243, 235, 223)
      Main Color file: Mask_Enh_Enh_Brass_01.TIF  RGB: [((243, 235, 223), 1)] (243, 235, 223)  Color name: beige  Hex: #f3ebdf
Enh  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 122.4687  Sum Ch 0: 43.394792  Sum Ch 1: 43.394792  Sum Ch 2: 35.679116
          Histog   : 94.37184   N.List elem: 768  Max: 715308 Idx Max: 0   Min: 0 Idx Min: 1
          Color    : beige    RGB   : (243, 235, 223)    Hex color: #f3ebdf   Dec Color: 15985631
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 35.4333735885169   Percentage G: 29.133252822966192   Percentage B: 29.133252822966192
File Start: 2019-06-01 18:39:24.933920  Finish: 2019-06-01 18:39:32.269760   File Time: 0:00:07.335840
Iron_01.TIF
------------------------------------------------------------------------
Inf.File: Iron_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_01.TIF
    RGB percent from image: Iron_01.TIF
     ------------------------------
     Percent Red 33.900344832194875
     Percent Green 33.900344832194875
     Percent Blue 32.19931033561026
     ------------------------------
Enhancement color: Iron_01.TIF   Value: 2.0
   Enhance image: Iron_01.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_01.TIF
   Red background for image: Enh_Iron_01.TIF
   Save masked image with red background: Mask_Enh_Iron_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_01.TIF
    Main color from image: Mask_Enh_Iron_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((228, 227, 223), 1), ((226, 225, 223), 1), ((224, 223, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Iron_01.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 264.943069  Sum Ch 0: 89.816614  Sum Ch 1: 89.816614  Sum Ch 2: 85.309841
          Histog   : 94.37184   N.List elem: 768  Max: 233823 Idx Max: 10   Min: 0 Idx Min: 157
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 159), (1, 159), (0, 157)) Med Extremes: 79.5
          Percentage R: 33.900344832194875   Percentage G: 32.19931033561026   Percentage B: 32.19931033561026
File Start: 2019-06-01 18:39:32.270256  Finish: 2019-06-01 18:39:46.436693   File Time: 0:00:14.166437
Iron_02.TIF
------------------------------------------------------------------------
Inf.File: Iron_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_02.TIF
    RGB percent from image: Iron_02.TIF
     ------------------------------
     Percent Red 33.997855728481355
     Percent Green 33.997855728481355
     Percent Blue 32.004288543037305
     ------------------------------
Enhancement color: Iron_02.TIF   Value: 2.0
   Enhance image: Iron_02.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_02.TIF
   Red background for image: Enh_Iron_02.TIF
   Save masked image with red background: Mask_Enh_Iron_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_02.TIF
    Main color from image: Mask_Enh_Iron_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((228, 227, 223), 1), ((226, 225, 223), 1), ((226, 223, 223), 1), ((224, 223, 223), 1)]
      Read color name: (228, 227, 223)
      Main Color file: Mask_Enh_Iron_02.TIF  RGB: [((228, 227, 223), 1)] (228, 227, 223)  Color name: gainsboro  Hex: #e4e3df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 225.696231  Sum Ch 0: 76.731879  Sum Ch 1: 76.731879  Sum Ch 2: 72.232473
          Histog   : 94.37184   N.List elem: 768  Max: 249211 Idx Max: 10   Min: 0 Idx Min: 159
          Color    : gainsboro    RGB   : (228, 227, 223)    Hex color: #e4e3df   Dec Color: 15000543
          Extremes : ((1, 159), (1, 159), (0, 159)) Med Extremes: 79.83333333333333
          Percentage R: 33.997855728481355   Percentage G: 32.004288543037305   Percentage B: 32.004288543037305
File Start: 2019-06-01 18:39:46.437190  Finish: 2019-06-01 18:40:01.468526   File Time: 0:00:15.031336
Iron_03.TIF
------------------------------------------------------------------------
Inf.File: Iron_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_03.TIF
    RGB percent from image: Iron_03.TIF
     ------------------------------
     Percent Red 33.8705774800811
     Percent Green 33.8705774800811
     Percent Blue 32.258845039837794
     ------------------------------
Enhancement color: Iron_03.TIF   Value: 2.0
   Enhance image: Iron_03.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_03.TIF
   Red background for image: Enh_Iron_03.TIF
   Save masked image with red background: Mask_Enh_Iron_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_03.TIF
    Main color from image: Mask_Enh_Iron_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((232, 229, 223), 1), ((230, 229, 223), 1), ((228, 227, 223), 1), ((226, 225, 223), 1)]
      Read color name: (232, 229, 223)
      Main Color file: Mask_Enh_Iron_03.TIF  RGB: [((232, 229, 223), 1)] (232, 229, 223)  Color name: gainsboro  Hex: #e8e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 305.481411  Sum Ch 0: 103.468318  Sum Ch 1: 103.468318  Sum Ch 2: 98.544775
          Histog   : 94.37184   N.List elem: 768  Max: 212646 Idx Max: 11   Min: 0 Idx Min: 158
          Color    : gainsboro    RGB   : (232, 229, 223)    Hex color: #e8e5df   Dec Color: 15263199
          Extremes : ((1, 163), (1, 163), (0, 162)) Med Extremes: 81.66666666666667
          Percentage R: 33.8705774800811   Percentage G: 32.258845039837794   Percentage B: 32.258845039837794
File Start: 2019-06-01 18:40:01.469022  Finish: 2019-06-01 18:40:14.554013   File Time: 0:00:13.084991
Iron_04.TIF
------------------------------------------------------------------------
Inf.File: Iron_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_04.TIF
    RGB percent from image: Iron_04.TIF
     ------------------------------
     Percent Red 33.87970283850167
     Percent Green 33.87970283850167
     Percent Blue 32.24059432299667
     ------------------------------
Enhancement color: Iron_04.TIF   Value: 2.0
   Enhance image: Iron_04.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_04.TIF
   Red background for image: Enh_Iron_04.TIF
   Save masked image with red background: Mask_Enh_Iron_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_04.TIF
    Main color from image: Mask_Enh_Iron_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((228, 227, 223), 1), ((230, 225, 223), 1), ((226, 225, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Iron_04.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 300.732499  Sum Ch 0: 101.887277  Sum Ch 1: 101.887277  Sum Ch 2: 96.957945
          Histog   : 94.37184   N.List elem: 768  Max: 216346 Idx Max: 11   Min: 0 Idx Min: 160
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 163), (1, 163), (0, 163)) Med Extremes: 81.83333333333333
          Percentage R: 33.87970283850167   Percentage G: 32.24059432299667   Percentage B: 32.24059432299667
File Start: 2019-06-01 18:40:14.554013  Finish: 2019-06-01 18:40:29.601162   File Time: 0:00:15.047149
Iron_05.TIF
------------------------------------------------------------------------
Inf.File: Iron_05.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_05.TIF
    RGB percent from image: Iron_05.TIF
     ------------------------------
     Percent Red 34.126003035317325
     Percent Green 34.126003035317325
     Percent Blue 31.747993929365347
     ------------------------------
Enhancement color: Iron_05.TIF   Value: 2.0
   Enhance image: Iron_05.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_05.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_05.TIF
   Red background for image: Enh_Iron_05.TIF
   Save masked image with red background: Mask_Enh_Iron_05.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_05.TIF
    Main color from image: Mask_Enh_Iron_05.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((249, 229, 223), 1), ((235, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (249, 229, 223)
      Main Color file: Mask_Enh_Iron_05.TIF  RGB: [((249, 229, 223), 1)] (249, 229, 223)  Color name: mistyrose  Hex: #f9e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 204.72983  Sum Ch 0: 69.866108  Sum Ch 1: 69.866108  Sum Ch 2: 64.997614
          Histog   : 94.37184   N.List elem: 768  Max: 247280 Idx Max: 9   Min: 0 Idx Min: 155
          Color    : mistyrose    RGB   : (249, 229, 223)    Hex color: #f9e5df   Dec Color: 16377311
          Extremes : ((1, 157), (1, 157), (0, 155)) Med Extremes: 78.5
          Percentage R: 34.126003035317325   Percentage G: 31.747993929365347   Percentage B: 31.747993929365347
File Start: 2019-06-01 18:40:29.601656  Finish: 2019-06-01 18:40:42.907851   File Time: 0:00:13.306195
Iron_06.TIF
------------------------------------------------------------------------
Inf.File: Iron_06.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_06.TIF
    RGB percent from image: Iron_06.TIF
     ------------------------------
     Percent Red 34.08740130252074
     Percent Green 34.08740130252074
     Percent Blue 31.825197394958522
     ------------------------------
Enhancement color: Iron_06.TIF   Value: 2.0
   Enhance image: Iron_06.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_06.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_06.TIF
   Red background for image: Enh_Iron_06.TIF
   Save masked image with red background: Mask_Enh_Iron_06.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_06.TIF
    Main color from image: Mask_Enh_Iron_06.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((230, 229, 223), 1), ((230, 227, 223), 1), ((228, 227, 223), 1), ((240, 226, 223), 1)]
      Read color name: (230, 229, 223)
      Main Color file: Mask_Enh_Iron_06.TIF  RGB: [((230, 229, 223), 1)] (230, 229, 223)  Color name: gainsboro  Hex: #e6e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 214.413784  Sum Ch 0: 73.088087  Sum Ch 1: 73.088087  Sum Ch 2: 68.23761
          Histog   : 94.37184   N.List elem: 768  Max: 230280 Idx Max: 8   Min: 0 Idx Min: 151
          Color    : gainsboro    RGB   : (230, 229, 223)    Hex color: #e6e5df   Dec Color: 15132127
          Extremes : ((1, 168), (1, 168), (0, 168)) Med Extremes: 84.33333333333333
          Percentage R: 34.08740130252074   Percentage G: 31.825197394958522   Percentage B: 31.825197394958522
File Start: 2019-06-01 18:40:42.907851  Finish: 2019-06-01 18:40:57.239866   File Time: 0:00:14.332015
Iron_07.TIF
------------------------------------------------------------------------
Inf.File: Iron_07.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_07.TIF
    RGB percent from image: Iron_07.TIF
     ------------------------------
     Percent Red 34.06419399284424
     Percent Green 34.06419399284424
     Percent Blue 31.871612014311523
     ------------------------------
Enhancement color: Iron_07.TIF   Value: 2.0
   Enhance image: Iron_07.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_07.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_07.TIF
   Red background for image: Enh_Iron_07.TIF
   Save masked image with red background: Mask_Enh_Iron_07.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_07.TIF
    Main color from image: Mask_Enh_Iron_07.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1), ((245, 228, 223), 1)]
      Read color name: (233, 229, 223)
      Main Color file: Mask_Enh_Iron_07.TIF  RGB: [((233, 229, 223), 1)] (233, 229, 223)  Color name: gainsboro  Hex: #e9e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 216.771872  Sum Ch 0: 73.841591  Sum Ch 1: 73.841591  Sum Ch 2: 69.08869
          Histog   : 94.37184   N.List elem: 768  Max: 231255 Idx Max: 10   Min: 0 Idx Min: 155
          Color    : gainsboro    RGB   : (233, 229, 223)    Hex color: #e9e5df   Dec Color: 15328735
          Extremes : ((1, 173), (1, 173), (0, 173)) Med Extremes: 86.83333333333333
          Percentage R: 34.06419399284424   Percentage G: 31.871612014311523   Percentage B: 31.871612014311523
File Start: 2019-06-01 18:40:57.240362  Finish: 2019-06-01 18:41:13.655958   File Time: 0:00:16.415596
Iron_08.TIF
------------------------------------------------------------------------
Inf.File: Iron_08.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_08.TIF
    RGB percent from image: Iron_08.TIF
     ------------------------------
     Percent Red 34.1138005411127
     Percent Green 34.1138005411127
     Percent Blue 31.772398917774584
     ------------------------------
Enhancement color: Iron_08.TIF   Value: 2.0
   Enhance image: Iron_08.TIF   Value: 2.0
   Save enhanced file : Enh_Iron_08.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_Iron_08.TIF
   Red background for image: Enh_Iron_08.TIF
   Save masked image with red background: Mask_Enh_Iron_08.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_Iron_08.TIF
    Main color from image: Mask_Enh_Iron_08.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((243, 229, 223), 1), ((235, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (243, 229, 223)
      Main Color file: Mask_Enh_Iron_08.TIF  RGB: [((243, 229, 223), 1)] (243, 229, 223)  Color name: mistyrose  Hex: #f3e5df
Iron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 203.316977  Sum Ch 0: 69.359148  Sum Ch 1: 69.359148  Sum Ch 2: 64.598681
          Histog   : 94.37184   N.List elem: 768  Max: 232920 Idx Max: 10   Min: 0 Idx Min: 154
          Color    : mistyrose    RGB   : (243, 229, 223)    Hex color: #f3e5df   Dec Color: 15984095
          Extremes : ((1, 233), (1, 233), (0, 230)) Med Extremes: 116.33333333333333
          Percentage R: 34.1138005411127   Percentage G: 31.772398917774584   Percentage B: 31.772398917774584
File Start: 2019-06-01 18:41:13.655958  Finish: 2019-06-01 18:41:31.141129   File Time: 0:00:17.485171
MASK_Enh_Aluminum_01.TIF
------------------------------------------------------------------------
Inf.File: MASK_Enh_Aluminum_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/MASK_Enh_Aluminum_01.TIF
    RGB percent from image: MASK_Enh_Aluminum_01.TIF
     ------------------------------
     Percent Red 84.26545228995984
     Percent Green 7.9412458026814905
     Percent Blue 7.79330190735867
     ------------------------------
Enhancement color: MASK_Enh_Aluminum_01.TIF   Value: 2.0
   Enhance image: MASK_Enh_Aluminum_01.TIF   Value: 2.0
   Save enhanced file : Enh_MASK_Enh_Aluminum_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_MASK_Enh_Aluminum_01.TIF
   Red background for image: Enh_MASK_Enh_Aluminum_01.TIF
   Save masked image with red background: Mask_Enh_MASK_Enh_Aluminum_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_MASK_Enh_Aluminum_01.TIF
    Main color from image: Mask_Enh_MASK_Enh_Aluminum_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 235, 223), 1), ((243, 235, 223), 1), ((241, 235, 223), 1), ((237, 235, 223), 1)]
      Read color name: (255, 235, 223)
      Main Color file: Mask_Enh_MASK_Enh_Aluminum_01.TIF  RGB: [((255, 235, 223), 1)] (255, 235, 223)  Color name: mistyrose  Hex: #ffebdf
MASK  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 889.02891  Sum Ch 0: 749.144232  Sum Ch 1: 70.599971  Sum Ch 2: 69.284707
          Histog   : 94.37184   N.List elem: 768  Max: 2654298 Idx Max: 0   Min: 21 Idx Min: 243
          Color    : mistyrose    RGB   : (255, 235, 223)    Hex color: #ffebdf   Dec Color: 16772063
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 84.26545228995984   Percentage G: 7.79330190735867   Percentage B: 7.79330190735867
File Start: 2019-06-01 18:41:31.141625  Finish: 2019-06-01 18:41:41.399952   File Time: 0:00:10.258327
MASK_Enh_Aluminum_02.TIF
------------------------------------------------------------------------
Inf.File: MASK_Enh_Aluminum_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/MASK_Enh_Aluminum_02.TIF
    RGB percent from image: MASK_Enh_Aluminum_02.TIF
     ------------------------------
     Percent Red 84.75136688587929
     Percent Green 7.695266112391577
     Percent Blue 7.553367001729125
     ------------------------------
Enhancement color: MASK_Enh_Aluminum_02.TIF   Value: 2.0
   Enhance image: MASK_Enh_Aluminum_02.TIF   Value: 2.0
   Save enhanced file : Enh_MASK_Enh_Aluminum_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_MASK_Enh_Aluminum_02.TIF
   Red background for image: Enh_MASK_Enh_Aluminum_02.TIF
   Save masked image with red background: Mask_Enh_MASK_Enh_Aluminum_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_MASK_Enh_Aluminum_02.TIF
    Main color from image: Mask_Enh_MASK_Enh_Aluminum_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((238, 235, 223), 1), ((255, 234, 223), 1), ((238, 234, 223), 1), ((255, 233, 223), 1)]
      Read color name: (238, 235, 223)
      Main Color file: Mask_Enh_MASK_Enh_Aluminum_02.TIF  RGB: [((238, 235, 223), 1)] (238, 235, 223)  Color name: beige  Hex: #eeebdf
MASK  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 886.216266  Sum Ch 0: 751.080399  Sum Ch 1: 68.1967  Sum Ch 2: 66.939167
          Histog   : 94.37184   N.List elem: 768  Max: 2646428 Idx Max: 0   Min: 12 Idx Min: 243
          Color    : beige    RGB   : (238, 235, 223)    Hex color: #eeebdf   Dec Color: 15657951
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 84.75136688587929   Percentage G: 7.553367001729125   Percentage B: 7.553367001729125
File Start: 2019-06-01 18:41:41.399952  Finish: 2019-06-01 18:41:52.528736   File Time: 0:00:11.128784
MASK_Enh_Aluminum_03.TIF
------------------------------------------------------------------------
Inf.File: MASK_Enh_Aluminum_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/MASK_Enh_Aluminum_03.TIF
    RGB percent from image: MASK_Enh_Aluminum_03.TIF
     ------------------------------
     Percent Red 81.51839467781946
     Percent Green 9.324209853458107
     Percent Blue 9.157395468722424
     ------------------------------
Enhancement color: MASK_Enh_Aluminum_03.TIF   Value: 2.0
   Enhance image: MASK_Enh_Aluminum_03.TIF   Value: 2.0
   Save enhanced file : Enh_MASK_Enh_Aluminum_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_MASK_Enh_Aluminum_03.TIF
   Red background for image: Enh_MASK_Enh_Aluminum_03.TIF
   Save masked image with red background: Mask_Enh_MASK_Enh_Aluminum_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_MASK_Enh_Aluminum_03.TIF
    Main color from image: Mask_Enh_MASK_Enh_Aluminum_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 235, 223), 1), ((241, 235, 223), 1), ((239, 235, 223), 1), ((235, 235, 223), 1)]
      Read color name: (255, 235, 223)
      Main Color file: Mask_Enh_MASK_Enh_Aluminum_03.TIF  RGB: [((255, 235, 223), 1)] (255, 235, 223)  Color name: mistyrose  Hex: #ffebdf
MASK  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 908.627276  Sum Ch 0: 740.698369  Sum Ch 1: 84.722314  Sum Ch 2: 83.206593
          Histog   : 94.37184   N.List elem: 768  Max: 2547283 Idx Max: 0   Min: 58 Idx Min: 235
          Color    : mistyrose    RGB   : (255, 235, 223)    Hex color: #ffebdf   Dec Color: 16772063
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 81.51839467781946   Percentage G: 9.157395468722424   Percentage B: 9.157395468722424
File Start: 2019-06-01 18:41:52.528736  Finish: 2019-06-01 18:42:04.189954   File Time: 0:00:11.661218
MASK_Enh_Aluminum_04.TIF
------------------------------------------------------------------------
Inf.File: MASK_Enh_Aluminum_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/MASK_Enh_Aluminum_04.TIF
    RGB percent from image: MASK_Enh_Aluminum_04.TIF
     ------------------------------
     Percent Red 80.80042373508218
     Percent Green 9.689759296931316
     Percent Blue 9.509816967986518
     ------------------------------
Enhancement color: MASK_Enh_Aluminum_04.TIF   Value: 2.0
   Enhance image: MASK_Enh_Aluminum_04.TIF   Value: 2.0
   Save enhanced file : Enh_MASK_Enh_Aluminum_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_MASK_Enh_Aluminum_04.TIF
   Red background for image: Enh_MASK_Enh_Aluminum_04.TIF
   Save masked image with red background: Mask_Enh_MASK_Enh_Aluminum_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_MASK_Enh_Aluminum_04.TIF
    Main color from image: Mask_Enh_MASK_Enh_Aluminum_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 235, 223), 1), ((253, 235, 223), 1), ((243, 235, 223), 1), ((239, 235, 223), 1)]
      Read color name: (255, 235, 223)
      Main Color file: Mask_Enh_MASK_Enh_Aluminum_04.TIF  RGB: [((255, 235, 223), 1)] (255, 235, 223)  Color name: mistyrose  Hex: #ffebdf
MASK  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 892.191409  Sum Ch 0: 720.894439  Sum Ch 1: 86.4512  Sum Ch 2: 84.84577
          Histog   : 94.37184   N.List elem: 768  Max: 2492067 Idx Max: 0   Min: 24 Idx Min: 252
          Color    : mistyrose    RGB   : (255, 235, 223)    Hex color: #ffebdf   Dec Color: 16772063
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 80.80042373508218   Percentage G: 9.509816967986518   Percentage B: 9.509816967986518
File Start: 2019-06-01 18:42:04.189954  Finish: 2019-06-01 18:42:15.161475   File Time: 0:00:10.971521
MASK_Enh_Brass_01.TIF
------------------------------------------------------------------------
Inf.File: MASK_Enh_Brass_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/MASK_Enh_Brass_01.TIF
    RGB percent from image: MASK_Enh_Brass_01.TIF
     ------------------------------
     Percent Red 97.66194395305871
     Percent Green 1.1858285741113515
     Percent Blue 1.1522274728299384
     ------------------------------
Enhancement color: MASK_Enh_Brass_01.TIF   Value: 2.0
   Enhance image: MASK_Enh_Brass_01.TIF   Value: 2.0
   Save enhanced file : Enh_MASK_Enh_Brass_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_MASK_Enh_Brass_01.TIF
   Red background for image: Enh_MASK_Enh_Brass_01.TIF
   Save masked image with red background: Mask_Enh_MASK_Enh_Brass_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_MASK_Enh_Brass_01.TIF
    Main color from image: Mask_Enh_MASK_Enh_Brass_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((255, 235, 223), 1), ((239, 235, 223), 1), ((235, 235, 223), 1), ((255, 234, 223), 1)]
      Read color name: (255, 235, 223)
      Main Color file: Mask_Enh_MASK_Enh_Brass_01.TIF  RGB: [((255, 235, 223), 1)] (255, 235, 223)  Color name: mistyrose  Hex: #ffebdf
MASK  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 805.646213  Sum Ch 0: 786.809753  Sum Ch 1: 9.553583  Sum Ch 2: 9.282877
          Histog   : 94.37184   N.List elem: 768  Max: 3025475 Idx Max: 0   Min: 40 Idx Min: 245
          Color    : mistyrose    RGB   : (255, 235, 223)    Hex color: #ffebdf   Dec Color: 16772063
          Extremes : ((0, 255), (0, 255), (0, 255)) Med Extremes: 127.5
          Percentage R: 97.66194395305871   Percentage G: 1.1522274728299384   Percentage B: 1.1522274728299384
File Start: 2019-06-01 18:42:15.161970  Finish: 2019-06-01 18:42:24.345448   File Time: 0:00:09.183478
PaintedIron_01.TIF
------------------------------------------------------------------------
Inf.File: PaintedIron_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_01.TIF
    RGB percent from image: PaintedIron_01.TIF
     ------------------------------
     Percent Red 34.295364240934745
     Percent Green 34.295364240934745
     Percent Blue 31.409271518130517
     ------------------------------
Enhancement color: PaintedIron_01.TIF   Value: 2.0
   Enhance image: PaintedIron_01.TIF   Value: 2.0
   Save enhanced file : Enh_PaintedIron_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_PaintedIron_01.TIF
   Red background for image: Enh_PaintedIron_01.TIF
   Save masked image with red background: Mask_Enh_PaintedIron_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_PaintedIron_01.TIF
    Main color from image: Mask_Enh_PaintedIron_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((246, 229, 223), 1), ((234, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1)]
      Read color name: (246, 229, 223)
      Main Color file: Mask_Enh_PaintedIron_01.TIF  RGB: [((246, 229, 223), 1)] (246, 229, 223)  Color name: mistyrose  Hex: #f6e5df
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 155.320928  Sum Ch 0: 53.267878  Sum Ch 1: 53.267878  Sum Ch 2: 48.785172
          Histog   : 94.37184   N.List elem: 768  Max: 345478 Idx Max: 9   Min: 0 Idx Min: 149
          Color    : mistyrose    RGB   : (246, 229, 223)    Hex color: #f6e5df   Dec Color: 16180703
          Extremes : ((1, 154), (1, 154), (0, 153)) Med Extremes: 77.16666666666667
          Percentage R: 34.295364240934745   Percentage G: 31.409271518130517   Percentage B: 31.409271518130517
File Start: 2019-06-01 18:42:24.346937  Finish: 2019-06-01 18:42:55.657934   File Time: 0:00:31.310997
PaintedIron_02.TIF
------------------------------------------------------------------------
Inf.File: PaintedIron_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_02.TIF
    RGB percent from image: PaintedIron_02.TIF
     ------------------------------
     Percent Red 34.32501995011145
     Percent Green 34.32501995011145
     Percent Blue 31.349960099777107
     ------------------------------
Enhancement color: PaintedIron_02.TIF   Value: 2.0
   Enhance image: PaintedIron_02.TIF   Value: 2.0
   Save enhanced file : Enh_PaintedIron_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_PaintedIron_02.TIF
   Red background for image: Enh_PaintedIron_02.TIF
   Save masked image with red background: Mask_Enh_PaintedIron_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_PaintedIron_02.TIF
    Main color from image: Mask_Enh_PaintedIron_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((234, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1), ((242, 228, 223), 1)]
      Read color name: (234, 229, 223)
      Main Color file: Mask_Enh_PaintedIron_02.TIF  RGB: [((234, 229, 223), 1)] (234, 229, 223)  Color name: gainsboro  Hex: #eae5df
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 150.476603  Sum Ch 0: 51.651124  Sum Ch 1: 51.651124  Sum Ch 2: 47.174355
          Histog   : 94.37184   N.List elem: 768  Max: 353839 Idx Max: 8   Min: 0 Idx Min: 145
          Color    : gainsboro    RGB   : (234, 229, 223)    Hex color: #eae5df   Dec Color: 15394271
          Extremes : ((1, 152), (1, 152), (0, 149)) Med Extremes: 75.83333333333333
          Percentage R: 34.32501995011145   Percentage G: 31.349960099777107   Percentage B: 31.349960099777107
File Start: 2019-06-01 18:42:55.658430  Finish: 2019-06-01 18:43:07.224159   File Time: 0:00:11.565729
PaintedIron_03.TIF
------------------------------------------------------------------------
Inf.File: PaintedIron_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_03.TIF
    RGB percent from image: PaintedIron_03.TIF
     ------------------------------
     Percent Red 34.490350632134536
     Percent Green 34.490350632134536
     Percent Blue 31.01929873573094
     ------------------------------
Enhancement color: PaintedIron_03.TIF   Value: 2.0
   Enhance image: PaintedIron_03.TIF   Value: 2.0
   Save enhanced file : Enh_PaintedIron_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_PaintedIron_03.TIF
   Red background for image: Enh_PaintedIron_03.TIF
   Save masked image with red background: Mask_Enh_PaintedIron_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_PaintedIron_03.TIF
    Main color from image: Mask_Enh_PaintedIron_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((235, 229, 223), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (235, 229, 223)
      Main Color file: Mask_Enh_PaintedIron_03.TIF  RGB: [((235, 229, 223), 1)] (235, 229, 223)  Color name: gainsboro  Hex: #ebe5df
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 142.346993  Sum Ch 0: 49.095977  Sum Ch 1: 49.095977  Sum Ch 2: 44.155039
          Histog   : 94.37184   N.List elem: 768  Max: 356636 Idx Max: 8   Min: 0 Idx Min: 142
          Color    : gainsboro    RGB   : (235, 229, 223)    Hex color: #ebe5df   Dec Color: 15459807
          Extremes : ((1, 147), (1, 147), (0, 145)) Med Extremes: 73.5
          Percentage R: 34.490350632134536   Percentage G: 31.01929873573094   Percentage B: 31.01929873573094
File Start: 2019-06-01 18:43:07.224159  Finish: 2019-06-01 18:43:18.046987   File Time: 0:00:10.822828
PaintedIron_04.TIF
------------------------------------------------------------------------
Inf.File: PaintedIron_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_04.TIF
    RGB percent from image: PaintedIron_04.TIF
     ------------------------------
     Percent Red 34.47729495360336
     Percent Green 34.47729495360336
     Percent Blue 31.045410092793276
     ------------------------------
Enhancement color: PaintedIron_04.TIF   Value: 2.0
   Enhance image: PaintedIron_04.TIF   Value: 2.0
   Save enhanced file : Enh_PaintedIron_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_PaintedIron_04.TIF
   Red background for image: Enh_PaintedIron_04.TIF
   Save masked image with red background: Mask_Enh_PaintedIron_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_PaintedIron_04.TIF
    Main color from image: Mask_Enh_PaintedIron_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((235, 229, 223), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (235, 229, 223)
      Main Color file: Mask_Enh_PaintedIron_04.TIF  RGB: [((235, 229, 223), 1)] (235, 229, 223)  Color name: gainsboro  Hex: #ebe5df
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 143.721838  Sum Ch 0: 49.551402  Sum Ch 1: 49.551402  Sum Ch 2: 44.619034
          Histog   : 94.37184   N.List elem: 768  Max: 371011 Idx Max: 7   Min: 0 Idx Min: 136
          Color    : gainsboro    RGB   : (235, 229, 223)    Hex color: #ebe5df   Dec Color: 15459807
          Extremes : ((1, 146), (1, 146), (0, 144)) Med Extremes: 73.0
          Percentage R: 34.47729495360336   Percentage G: 31.045410092793276   Percentage B: 31.045410092793276
File Start: 2019-06-01 18:43:18.047483  Finish: 2019-06-01 18:43:29.074225   File Time: 0:00:11.026742
PaintedIron_05.TIF
------------------------------------------------------------------------
Inf.File: PaintedIron_05.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_05.TIF
    RGB percent from image: PaintedIron_05.TIF
     ------------------------------
     Percent Red 34.281060833040534
     Percent Green 34.281060833040534
     Percent Blue 31.437878333918935
     ------------------------------
Enhancement color: PaintedIron_05.TIF   Value: 2.0
   Enhance image: PaintedIron_05.TIF   Value: 2.0
   Save enhanced file : Enh_PaintedIron_05.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_PaintedIron_05.TIF
   Red background for image: Enh_PaintedIron_05.TIF
   Save masked image with red background: Mask_Enh_PaintedIron_05.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_PaintedIron_05.TIF
    Main color from image: Mask_Enh_PaintedIron_05.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((243, 229, 223), 1), ((235, 229, 223), 1), ((233, 229, 223), 1), ((231, 229, 223), 1)]
      Read color name: (243, 229, 223)
      Main Color file: Mask_Enh_PaintedIron_05.TIF  RGB: [((243, 229, 223), 1)] (243, 229, 223)  Color name: mistyrose  Hex: #f3e5df
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 162.789726  Sum Ch 0: 55.806045  Sum Ch 1: 55.806045  Sum Ch 2: 51.177636
          Histog   : 94.37184   N.List elem: 768  Max: 352642 Idx Max: 8   Min: 0 Idx Min: 141
          Color    : mistyrose    RGB   : (243, 229, 223)    Hex color: #f3e5df   Dec Color: 15984095
          Extremes : ((1, 152), (1, 152), (0, 150)) Med Extremes: 76.0
          Percentage R: 34.281060833040534   Percentage G: 31.437878333918935   Percentage B: 31.437878333918935
File Start: 2019-06-01 18:43:29.074225  Finish: 2019-06-01 18:43:43.170544   File Time: 0:00:14.096319
PaintedIron_06.TIF
------------------------------------------------------------------------
Inf.File: PaintedIron_06.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_06.TIF
    RGB percent from image: PaintedIron_06.TIF
     ------------------------------
     Percent Red 34.4042619520464
     Percent Green 34.4042619520464
     Percent Blue 31.191476095907213
     ------------------------------
Enhancement color: PaintedIron_06.TIF   Value: 2.0
   Enhance image: PaintedIron_06.TIF   Value: 2.0
   Save enhanced file : Enh_PaintedIron_06.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_PaintedIron_06.TIF
   Red background for image: Enh_PaintedIron_06.TIF
   Save masked image with red background: Mask_Enh_PaintedIron_06.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_PaintedIron_06.TIF
    Main color from image: Mask_Enh_PaintedIron_06.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((243, 229, 223), 1), ((235, 229, 223), 1), ((233, 229, 223), 1), ((231, 229, 223), 1)]
      Read color name: (243, 229, 223)
      Main Color file: Mask_Enh_PaintedIron_06.TIF  RGB: [((243, 229, 223), 1)] (243, 229, 223)  Color name: mistyrose  Hex: #f3e5df
PaintedIron  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 148.26164  Sum Ch 0: 51.008323  Sum Ch 1: 51.008323  Sum Ch 2: 46.244994
          Histog   : 94.37184   N.List elem: 768  Max: 339650 Idx Max: 7   Min: 0 Idx Min: 143
          Color    : mistyrose    RGB   : (243, 229, 223)    Hex color: #f3e5df   Dec Color: 15984095
          Extremes : ((1, 153), (1, 153), (0, 150)) Med Extremes: 76.33333333333333
          Percentage R: 34.4042619520464   Percentage G: 31.191476095907213   Percentage B: 31.191476095907213
File Start: 2019-06-01 18:43:43.170544  Finish: 2019-06-01 18:43:57.796531   File Time: 0:00:14.625987
StainlessSteel_01.TIF
------------------------------------------------------------------------
Inf.File: StainlessSteel_01.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_01.TIF
    RGB percent from image: StainlessSteel_01.TIF
     ------------------------------
     Percent Red 33.86898842021843
     Percent Green 33.86898842021843
     Percent Blue 32.26202315956314
     ------------------------------
Enhancement color: StainlessSteel_01.TIF   Value: 2.0
   Enhance image: StainlessSteel_01.TIF   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_01.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_StainlessSteel_01.TIF
   Red background for image: Enh_StainlessSteel_01.TIF
   Save masked image with red background: Mask_Enh_StainlessSteel_01.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_StainlessSteel_01.TIF
    Main color from image: Mask_Enh_StainlessSteel_01.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1), ((231, 228, 223), 1)]
      Read color name: (233, 229, 223)
      Main Color file: Mask_Enh_StainlessSteel_01.TIF  RGB: [((233, 229, 223), 1)] (233, 229, 223)  Color name: gainsboro  Hex: #e9e5df
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 280.133436  Sum Ch 0: 94.878361  Sum Ch 1: 94.878361  Sum Ch 2: 90.376714
          Histog   : 94.37184   N.List elem: 768  Max: 263983 Idx Max: 10   Min: 0 Idx Min: 255
          Color    : gainsboro    RGB   : (233, 229, 223)    Hex color: #e9e5df   Dec Color: 15328735
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.86898842021843   Percentage G: 32.26202315956314   Percentage B: 32.26202315956314
File Start: 2019-06-01 18:43:57.797027  Finish: 2019-06-01 18:44:10.495963   File Time: 0:00:12.698936
StainlessSteel_02.TIF
------------------------------------------------------------------------
Inf.File: StainlessSteel_02.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_02.TIF
    RGB percent from image: StainlessSteel_02.TIF
     ------------------------------
     Percent Red 33.94310863375323
     Percent Green 33.94310863375323
     Percent Blue 32.11378273249354
     ------------------------------
Enhancement color: StainlessSteel_02.TIF   Value: 2.0
   Enhance image: StainlessSteel_02.TIF   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_02.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_StainlessSteel_02.TIF
   Red background for image: Enh_StainlessSteel_02.TIF
   Save masked image with red background: Mask_Enh_StainlessSteel_02.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_StainlessSteel_02.TIF
    Main color from image: Mask_Enh_StainlessSteel_02.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((244, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1), ((234, 228, 223), 1)]
      Read color name: (244, 229, 223)
      Main Color file: Mask_Enh_StainlessSteel_02.TIF  RGB: [((244, 229, 223), 1)] (244, 229, 223)  Color name: mistyrose  Hex: #f4e5df
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 245.591395  Sum Ch 0: 83.361354  Sum Ch 1: 83.361354  Sum Ch 2: 78.868687
          Histog   : 94.37184   N.List elem: 768  Max: 284112 Idx Max: 10   Min: 0 Idx Min: 255
          Color    : mistyrose    RGB   : (244, 229, 223)    Hex color: #f4e5df   Dec Color: 16049631
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.94310863375323   Percentage G: 32.11378273249354   Percentage B: 32.11378273249354
File Start: 2019-06-01 18:44:10.495963  Finish: 2019-06-01 18:44:20.598810   File Time: 0:00:10.102847
StainlessSteel_03.TIF
------------------------------------------------------------------------
Inf.File: StainlessSteel_03.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_03.TIF
    RGB percent from image: StainlessSteel_03.TIF
     ------------------------------
     Percent Red 34.12214160492534
     Percent Green 34.12214160492534
     Percent Blue 31.755716790149318
     ------------------------------
Enhancement color: StainlessSteel_03.TIF   Value: 2.0
   Enhance image: StainlessSteel_03.TIF   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_03.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_StainlessSteel_03.TIF
   Red background for image: Enh_StainlessSteel_03.TIF
   Save masked image with red background: Mask_Enh_StainlessSteel_03.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_StainlessSteel_03.TIF
    Main color from image: Mask_Enh_StainlessSteel_03.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((234, 229, 223), 1), ((232, 229, 223), 1), ((230, 229, 223), 1), ((236, 227, 223), 1)]
      Read color name: (234, 229, 223)
      Main Color file: Mask_Enh_StainlessSteel_03.TIF  RGB: [((234, 229, 223), 1)] (234, 229, 223)  Color name: gainsboro  Hex: #eae5df
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 208.979553  Sum Ch 0: 71.308299  Sum Ch 1: 71.308299  Sum Ch 2: 66.362955
          Histog   : 94.37184   N.List elem: 768  Max: 297745 Idx Max: 11   Min: 0 Idx Min: 255
          Color    : gainsboro    RGB   : (234, 229, 223)    Hex color: #eae5df   Dec Color: 15394271
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 34.12214160492534   Percentage G: 31.755716790149318   Percentage B: 31.755716790149318
File Start: 2019-06-01 18:44:20.598810  Finish: 2019-06-01 18:44:31.589449   File Time: 0:00:10.990639
StainlessSteel_04.TIF
------------------------------------------------------------------------
Inf.File: StainlessSteel_04.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_04.TIF
    RGB percent from image: StainlessSteel_04.TIF
     ------------------------------
     Percent Red 33.99708308700248
     Percent Green 33.99708308700248
     Percent Blue 32.005833825995055
     ------------------------------
Enhancement color: StainlessSteel_04.TIF   Value: 2.0
   Enhance image: StainlessSteel_04.TIF   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_04.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_StainlessSteel_04.TIF
   Red background for image: Enh_StainlessSteel_04.TIF
   Save masked image with red background: Mask_Enh_StainlessSteel_04.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_StainlessSteel_04.TIF
    Main color from image: Mask_Enh_StainlessSteel_04.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((234, 229, 223), 1), ((230, 229, 223), 1), ((234, 227, 223), 1), ((232, 227, 223), 1)]
      Read color name: (234, 229, 223)
      Main Color file: Mask_Enh_StainlessSteel_04.TIF  RGB: [((234, 229, 223), 1)] (234, 229, 223)  Color name: gainsboro  Hex: #eae5df
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 247.456815  Sum Ch 0: 84.128099  Sum Ch 1: 84.128099  Sum Ch 2: 79.200617
          Histog   : 94.37184   N.List elem: 768  Max: 296137 Idx Max: 12   Min: 0 Idx Min: 240
          Color    : gainsboro    RGB   : (234, 229, 223)    Hex color: #eae5df   Dec Color: 15394271
          Extremes : ((1, 255), (1, 255), (0, 255)) Med Extremes: 127.83333333333333
          Percentage R: 33.99708308700248   Percentage G: 32.005833825995055   Percentage B: 32.005833825995055
File Start: 2019-06-01 18:44:31.589449  Finish: 2019-06-01 18:44:41.545659   File Time: 0:00:09.956210
StainlessSteel_05.TIF
------------------------------------------------------------------------
Inf.File: StainlessSteel_05.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_05.TIF
    RGB percent from image: StainlessSteel_05.TIF
     ------------------------------
     Percent Red 34.097956306225704
     Percent Green 34.097956306225704
     Percent Blue 31.804087387548595
     ------------------------------
Enhancement color: StainlessSteel_05.TIF   Value: 2.0
   Enhance image: StainlessSteel_05.TIF   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_05.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_StainlessSteel_05.TIF
   Red background for image: Enh_StainlessSteel_05.TIF
   Save masked image with red background: Mask_Enh_StainlessSteel_05.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_StainlessSteel_05.TIF
    Main color from image: Mask_Enh_StainlessSteel_05.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((235, 229, 223), 1), ((233, 229, 223), 1), ((231, 229, 223), 1), ((229, 229, 223), 1)]
      Read color name: (235, 229, 223)
      Main Color file: Mask_Enh_StainlessSteel_05.TIF  RGB: [((235, 229, 223), 1)] (235, 229, 223)  Color name: gainsboro  Hex: #ebe5df
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 214.909839  Sum Ch 0: 73.279863  Sum Ch 1: 73.279863  Sum Ch 2: 68.350113
          Histog   : 94.37184   N.List elem: 768  Max: 304852 Idx Max: 11   Min: 0 Idx Min: 254
          Color    : gainsboro    RGB   : (235, 229, 223)    Hex color: #ebe5df   Dec Color: 15459807
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.097956306225704   Percentage G: 31.804087387548595   Percentage B: 31.804087387548595
File Start: 2019-06-01 18:44:41.546156  Finish: 2019-06-01 18:44:50.911619   File Time: 0:00:09.365463
StainlessSteel_06.TIF
------------------------------------------------------------------------
Inf.File: StainlessSteel_06.TIF
Get Channel n:  0
Get Channel n:  1
Get Channel n:  2
Histogram analisys: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_06.TIF
    RGB percent from image: StainlessSteel_06.TIF
     ------------------------------
     Percent Red 34.14182248475463
     Percent Green 34.14182248475463
     Percent Blue 31.71635503049075
     ------------------------------
Enhancement color: StainlessSteel_06.TIF   Value: 2.0
   Enhance image: StainlessSteel_06.TIF   Value: 2.0
   Save enhanced file : Enh_StainlessSteel_06.TIF
Red background: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Enh_StainlessSteel_06.TIF
   Red background for image: Enh_StainlessSteel_06.TIF
   Save masked image with red background: Mask_Enh_StainlessSteel_06.TIF
Most common color: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/ Mask_Enh_StainlessSteel_06.TIF
    Main color from image: Mask_Enh_StainlessSteel_06.TIF
...  List without excluded colors
Count ocurrencies for color
      4 Most common colors: [((232, 229, 223), 1), ((230, 229, 223), 1), ((230, 227, 223), 1), ((228, 227, 223), 1)]
      Read color name: (232, 229, 223)
      Main Color file: Mask_Enh_StainlessSteel_06.TIF  RGB: [((232, 229, 223), 1)] (232, 229, 223)  Color name: gainsboro  Hex: #e8e5df
StainlessSteel  Size: (2048, 1536)  Format: TIFF  Mode: RGB
          Sum array: 194.59016  Sum Ch 0: 66.436627  Sum Ch 1: 66.436627  Sum Ch 2: 61.716906
          Histog   : 94.37184   N.List elem: 768  Max: 314171 Idx Max: 12   Min: 0 Idx Min: 254
          Color    : gainsboro    RGB   : (232, 229, 223)    Hex color: #e8e5df   Dec Color: 15263199
          Extremes : ((1, 255), (1, 255), (0, 254)) Med Extremes: 127.66666666666667
          Percentage R: 34.14182248475463   Percentage G: 31.71635503049075   Percentage B: 31.71635503049075
File Start: 2019-06-01 18:44:50.912114  Finish: 2019-06-01 18:44:59.664036   File Time: 0:00:08.751922
Process Start: 2019-06-01 18:34:38.342512  Finish: 2019-06-01 18:44:59.664036   Global Time: 0:10:21.321524
In [26]:
#list_dec_back ordered
order_list_dec = sorted(list_dec_back, key=int) 
#order_list_dec
#list_non_back 
In [27]:
'''
TESTS
# Read all list to see the color - obtain RGB from int
for x in order_list_dec:
    #print(x)
    # Get RGB from INT
    xrgb = getRGBfromI(x)
    #print('Int:, x,'  RGB: ',xrgb)
    xt_color_name , hexdc = get_rgb_color_name(xrgb)
    print('Int:', x,'  RGB: ', xrgb, xt_color_name)
'''          
Out[27]:
"\nTESTS\n# Read all list to see the color - obtain RGB from int\nfor x in order_list_dec:\n    #print(x)\n    # Get RGB from INT\n    xrgb = getRGBfromI(x)\n    #print('Int:, x,'  RGB: ',xrgb)\n    xt_color_name , hexdc = get_rgb_color_name(xrgb)\n    print('Int:', x,'  RGB: ', xrgb, xt_color_name)\n"
In [28]:
df = pd.DataFrame(df_image,columns=['Folder','File','Material','Size','Format','Mode',
                                    'All_Bands', 'Sum_Ch0','Sum_Ch1','Sum_Ch2',
                                    'Histogram','Number_elements',
                                    'Color','Color_RGB', 'Color_hex','Color_dec','Med_Extrems',
                                    'Max_Histog', 'Idx_Max_Histog','Min_Histog', 'Idx_Min_Histog',
                                    'perc_R', 'perc_G', 'perc_B'])
df.head(10)
Out[28]:
Folder File Material Size Format Mode All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 ... Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 imagedata08 Aluminum_01.TIF Aluminum (2048, 1536) TIFF RGB 225.341887 76.708445 76.708445 71.924997 ... #eae5df 15394271 109.333333 251838 9 0 208 34.040917 34.040917 31.918166
1 imagedata08 Aluminum_02.TIF Aluminum (2048, 1536) TIFF RGB 232.768793 79.130088 79.130088 74.508617 ... #e6e5df 15132127 106.166667 244041 11 0 211 33.995145 33.995145 32.009711
2 imagedata08 Aluminum_03.TIF Aluminum (2048, 1536) TIFF RGB 281.688117 95.449458 95.449458 90.789201 ... #eae5df 15394271 125.666667 246108 11 0 247 33.884801 33.884801 32.230398
3 imagedata08 Aluminum_04.TIF Aluminum (2048, 1536) TIFF RGB 294.870824 99.847205 99.847205 95.176414 ... #e9e5df 15328735 127.833333 239672 11 0 255 33.861338 33.861338 32.277325
4 imagedata08 Brass_01.TIF Brass (2048, 1536) TIFF RGB 115.591735 40.112067 40.112067 35.367601 ... #eae5df 15394271 127.666667 310755 11 0 218 34.701501 34.701501 30.596998
5 imagedata08 Brass_02.TIF Brass (2048, 1536) TIFF RGB 115.114431 39.914903 39.914903 35.284625 ... #e6e5df 15132127 127.666667 303759 11 0 252 34.674109 34.674109 30.651782
6 imagedata08 Brass_04.TIF Brass (2048, 1536) TIFF RGB 112.513003 39.036133 39.036133 34.440737 ... #e6e5df 15132127 127.666667 303654 10 0 254 34.694775 34.694775 30.610450
7 imagedata08 Brass_05.TIF Brass (2048, 1536) TIFF RGB 115.000094 39.918248 39.918248 35.163598 ... #e8e5df 15263199 127.666667 304881 11 0 247 34.711492 34.711492 30.577017
8 imagedata08 Brass_06.TIF Brass (2048, 1536) TIFF RGB 124.310095 42.983402 42.983402 38.343291 ... #e5e5df 15066591 127.666667 317338 11 0 225 34.577563 34.577563 30.844873
9 imagedata08 Brass_07.TIF Brass (2048, 1536) TIFF RGB 122.271733 42.348619 42.348619 37.574495 ... #ebe5df 15459807 110.500000 318513 12 0 202 34.634840 34.634840 30.730320

10 rows × 24 columns

In [29]:
# Delete junk records
df = df[df.Material != 'MASK']
df = df[df.Material != 'Enh']
df
Out[29]:
Folder File Material Size Format Mode All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 ... Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 imagedata08 Aluminum_01.TIF Aluminum (2048, 1536) TIFF RGB 225.341887 76.708445 76.708445 71.924997 ... #eae5df 15394271 109.333333 251838 9 0 208 34.040917 34.040917 31.918166
1 imagedata08 Aluminum_02.TIF Aluminum (2048, 1536) TIFF RGB 232.768793 79.130088 79.130088 74.508617 ... #e6e5df 15132127 106.166667 244041 11 0 211 33.995145 33.995145 32.009711
2 imagedata08 Aluminum_03.TIF Aluminum (2048, 1536) TIFF RGB 281.688117 95.449458 95.449458 90.789201 ... #eae5df 15394271 125.666667 246108 11 0 247 33.884801 33.884801 32.230398
3 imagedata08 Aluminum_04.TIF Aluminum (2048, 1536) TIFF RGB 294.870824 99.847205 99.847205 95.176414 ... #e9e5df 15328735 127.833333 239672 11 0 255 33.861338 33.861338 32.277325
4 imagedata08 Brass_01.TIF Brass (2048, 1536) TIFF RGB 115.591735 40.112067 40.112067 35.367601 ... #eae5df 15394271 127.666667 310755 11 0 218 34.701501 34.701501 30.596998
5 imagedata08 Brass_02.TIF Brass (2048, 1536) TIFF RGB 115.114431 39.914903 39.914903 35.284625 ... #e6e5df 15132127 127.666667 303759 11 0 252 34.674109 34.674109 30.651782
6 imagedata08 Brass_04.TIF Brass (2048, 1536) TIFF RGB 112.513003 39.036133 39.036133 34.440737 ... #e6e5df 15132127 127.666667 303654 10 0 254 34.694775 34.694775 30.610450
7 imagedata08 Brass_05.TIF Brass (2048, 1536) TIFF RGB 115.000094 39.918248 39.918248 35.163598 ... #e8e5df 15263199 127.666667 304881 11 0 247 34.711492 34.711492 30.577017
8 imagedata08 Brass_06.TIF Brass (2048, 1536) TIFF RGB 124.310095 42.983402 42.983402 38.343291 ... #e5e5df 15066591 127.666667 317338 11 0 225 34.577563 34.577563 30.844873
9 imagedata08 Brass_07.TIF Brass (2048, 1536) TIFF RGB 122.271733 42.348619 42.348619 37.574495 ... #ebe5df 15459807 110.500000 318513 12 0 202 34.634840 34.634840 30.730320
10 imagedata08 Brass_08.TIF Brass (2048, 1536) TIFF RGB 124.488185 43.045525 43.045525 38.397135 ... #e5e5df 15066591 109.833333 320231 11 0 206 34.578000 34.578000 30.843999
11 imagedata08 CopperWire_01.TIF CopperWire (2048, 1536) TIFF RGB 165.883977 56.808970 56.808970 52.266037 ... #e5e5df 15066591 78.666667 327884 10 0 156 34.246207 34.246207 31.507586
12 imagedata08 CopperWire_02.TIF CopperWire (2048, 1536) TIFF RGB 181.932704 62.185989 62.185989 57.560726 ... #e5e5df 15066591 78.666667 303195 9 0 156 34.180764 34.180764 31.638471
13 imagedata08 CopperWire_03.TIF CopperWire (2048, 1536) TIFF RGB 202.037768 68.887443 68.887443 64.262882 ... #e5e5df 15066591 80.166667 295451 9 0 157 34.096320 34.096320 31.807361
14 imagedata08 CopperWire_04.TIF CopperWire (2048, 1536) TIFF RGB 531.395758 178.691930 178.691930 174.011898 ... #a9a59f 11117983 72.500000 92231 9 0 131 33.626902 33.626902 32.746196
15 imagedata08 CopperWire_05.TIF CopperWire (2048, 1536) TIFF RGB 535.292923 179.992400 179.992400 175.308123 ... #a9a59f 11117983 75.333333 85458 9 0 131 33.625029 33.625029 32.749942
16 imagedata08 Copper_01.TIF Copper (2048, 1536) TIFF RGB 147.616898 50.731603 50.731603 46.153692 ... #e5e5df 15066591 84.833333 318670 9 0 153 34.367070 34.367070 31.265860
17 imagedata08 Copper_02.TIF Copper (2048, 1536) TIFF RGB 142.227555 49.009888 49.009888 44.207779 ... #e7e5df 15197663 89.833333 321043 10 0 160 34.458785 34.458785 31.082429
18 imagedata08 Copper_03.TIF Copper (2048, 1536) TIFF RGB 130.530910 45.105093 45.105093 40.320724 ... #e6e5df 15132127 84.000000 309376 11 0 162 34.555105 34.555105 30.889790
19 imagedata08 Copper_04.TIF Copper (2048, 1536) TIFF RGB 163.031541 55.942568 55.942568 51.146405 ... #e5e5df 15066591 78.166667 322371 10 0 155 34.313954 34.313954 31.372092
20 imagedata08 Copper_05.TIF Copper (2048, 1536) TIFF RGB 156.115532 53.638529 53.638529 48.838474 ... #e6e5df 15132127 78.166667 329941 10 0 155 34.358227 34.358227 31.283546
21 imagedata08 Copper_06.TIF Copper (2048, 1536) TIFF RGB 137.346139 47.383762 47.383762 42.578615 ... #e6e5df 15132127 77.166667 340247 10 0 153 34.499522 34.499522 31.000955
22 imagedata08 Copper_07.TIF Copper (2048, 1536) TIFF RGB 119.949182 41.568840 41.568840 36.811502 ... #c6c5bf 13026751 85.333333 303151 11 0 131 34.655376 34.655376 30.689248
23 imagedata08 Copper_08.TIF Copper (2048, 1536) TIFF RGB 119.562843 41.439866 41.439866 36.683111 ... #e4e3df 15000543 91.666667 305393 9 0 131 34.659485 34.659485 30.681029
29 imagedata08 Iron_01.TIF Iron (2048, 1536) TIFF RGB 264.943069 89.816614 89.816614 85.309841 ... #e6e5df 15132127 79.500000 233823 10 0 157 33.900345 33.900345 32.199310
30 imagedata08 Iron_02.TIF Iron (2048, 1536) TIFF RGB 225.696231 76.731879 76.731879 72.232473 ... #e4e3df 15000543 79.833333 249211 10 0 159 33.997856 33.997856 32.004289
31 imagedata08 Iron_03.TIF Iron (2048, 1536) TIFF RGB 305.481411 103.468318 103.468318 98.544775 ... #e8e5df 15263199 81.666667 212646 11 0 158 33.870577 33.870577 32.258845
32 imagedata08 Iron_04.TIF Iron (2048, 1536) TIFF RGB 300.732499 101.887277 101.887277 96.957945 ... #e6e5df 15132127 81.833333 216346 11 0 160 33.879703 33.879703 32.240594
33 imagedata08 Iron_05.TIF Iron (2048, 1536) TIFF RGB 204.729830 69.866108 69.866108 64.997614 ... #f9e5df 16377311 78.500000 247280 9 0 155 34.126003 34.126003 31.747994
34 imagedata08 Iron_06.TIF Iron (2048, 1536) TIFF RGB 214.413784 73.088087 73.088087 68.237610 ... #e6e5df 15132127 84.333333 230280 8 0 151 34.087401 34.087401 31.825197
35 imagedata08 Iron_07.TIF Iron (2048, 1536) TIFF RGB 216.771872 73.841591 73.841591 69.088690 ... #e9e5df 15328735 86.833333 231255 10 0 155 34.064194 34.064194 31.871612
36 imagedata08 Iron_08.TIF Iron (2048, 1536) TIFF RGB 203.316977 69.359148 69.359148 64.598681 ... #f3e5df 15984095 116.333333 232920 10 0 154 34.113801 34.113801 31.772399
42 imagedata08 PaintedIron_01.TIF PaintedIron (2048, 1536) TIFF RGB 155.320928 53.267878 53.267878 48.785172 ... #f6e5df 16180703 77.166667 345478 9 0 149 34.295364 34.295364 31.409272
43 imagedata08 PaintedIron_02.TIF PaintedIron (2048, 1536) TIFF RGB 150.476603 51.651124 51.651124 47.174355 ... #eae5df 15394271 75.833333 353839 8 0 145 34.325020 34.325020 31.349960
44 imagedata08 PaintedIron_03.TIF PaintedIron (2048, 1536) TIFF RGB 142.346993 49.095977 49.095977 44.155039 ... #ebe5df 15459807 73.500000 356636 8 0 142 34.490351 34.490351 31.019299
45 imagedata08 PaintedIron_04.TIF PaintedIron (2048, 1536) TIFF RGB 143.721838 49.551402 49.551402 44.619034 ... #ebe5df 15459807 73.000000 371011 7 0 136 34.477295 34.477295 31.045410
46 imagedata08 PaintedIron_05.TIF PaintedIron (2048, 1536) TIFF RGB 162.789726 55.806045 55.806045 51.177636 ... #f3e5df 15984095 76.000000 352642 8 0 141 34.281061 34.281061 31.437878
47 imagedata08 PaintedIron_06.TIF PaintedIron (2048, 1536) TIFF RGB 148.261640 51.008323 51.008323 46.244994 ... #f3e5df 15984095 76.333333 339650 7 0 143 34.404262 34.404262 31.191476
48 imagedata08 StainlessSteel_01.TIF StainlessSteel (2048, 1536) TIFF RGB 280.133436 94.878361 94.878361 90.376714 ... #e9e5df 15328735 127.833333 263983 10 0 255 33.868988 33.868988 32.262023
49 imagedata08 StainlessSteel_02.TIF StainlessSteel (2048, 1536) TIFF RGB 245.591395 83.361354 83.361354 78.868687 ... #f4e5df 16049631 127.833333 284112 10 0 255 33.943109 33.943109 32.113783
50 imagedata08 StainlessSteel_03.TIF StainlessSteel (2048, 1536) TIFF RGB 208.979553 71.308299 71.308299 66.362955 ... #eae5df 15394271 127.833333 297745 11 0 255 34.122142 34.122142 31.755717
51 imagedata08 StainlessSteel_04.TIF StainlessSteel (2048, 1536) TIFF RGB 247.456815 84.128099 84.128099 79.200617 ... #eae5df 15394271 127.833333 296137 12 0 240 33.997083 33.997083 32.005834
52 imagedata08 StainlessSteel_05.TIF StainlessSteel (2048, 1536) TIFF RGB 214.909839 73.279863 73.279863 68.350113 ... #ebe5df 15459807 127.666667 304852 11 0 254 34.097956 34.097956 31.804087
53 imagedata08 StainlessSteel_06.TIF StainlessSteel (2048, 1536) TIFF RGB 194.590160 66.436627 66.436627 61.716906 ... #e8e5df 15263199 127.666667 314171 12 0 254 34.141822 34.141822 31.716355

44 rows × 24 columns

Write statistics in excel book

In [30]:
# Verify my current folder
path = mypath + r"/upt_data.xlsx"
print('Write statistics into file :', path)

# Block to Read excel old excel file
book = load_workbook(path)
writer = pd.ExcelWriter(path, engine = 'openpyxl')
writer.book = book
# ------------------------

# Write statistics into excel file
#writer = pd.ExcelWriter(path, engine = 'xlsxwriter') # only for new excelfile
df.to_excel(writer, sheet_name = folder)
writer.save()
writer.close()
Write statistics into file : C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/upt_data.xlsx

Plot

In [31]:
df_plot = pd.DataFrame(df, columns=["Material", "All_Bands", "Sum_Ch0", "Sum_Ch1", "Sum_Ch2",
                                    "Color", "Color_RGB", "Color_hex","Color_dec",
                                    "Med_Extrems", "Max_Histog", "Idx_Max_Histog","Min_Histog",
                                    "Idx_Min_Histog","perc_R", "perc_G", "perc_B"])
df_plot
Out[31]:
Material All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color Color_RGB Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 Aluminum 225.341887 76.708445 76.708445 71.924997 gainsboro (234, 229, 223) #eae5df 15394271 109.333333 251838 9 0 208 34.040917 34.040917 31.918166
1 Aluminum 232.768793 79.130088 79.130088 74.508617 gainsboro (230, 229, 223) #e6e5df 15132127 106.166667 244041 11 0 211 33.995145 33.995145 32.009711
2 Aluminum 281.688117 95.449458 95.449458 90.789201 gainsboro (234, 229, 223) #eae5df 15394271 125.666667 246108 11 0 247 33.884801 33.884801 32.230398
3 Aluminum 294.870824 99.847205 99.847205 95.176414 gainsboro (233, 229, 223) #e9e5df 15328735 127.833333 239672 11 0 255 33.861338 33.861338 32.277325
4 Brass 115.591735 40.112067 40.112067 35.367601 gainsboro (234, 229, 223) #eae5df 15394271 127.666667 310755 11 0 218 34.701501 34.701501 30.596998
5 Brass 115.114431 39.914903 39.914903 35.284625 gainsboro (230, 229, 223) #e6e5df 15132127 127.666667 303759 11 0 252 34.674109 34.674109 30.651782
6 Brass 112.513003 39.036133 39.036133 34.440737 gainsboro (230, 229, 223) #e6e5df 15132127 127.666667 303654 10 0 254 34.694775 34.694775 30.610450
7 Brass 115.000094 39.918248 39.918248 35.163598 gainsboro (232, 229, 223) #e8e5df 15263199 127.666667 304881 11 0 247 34.711492 34.711492 30.577017
8 Brass 124.310095 42.983402 42.983402 38.343291 gainsboro (229, 229, 223) #e5e5df 15066591 127.666667 317338 11 0 225 34.577563 34.577563 30.844873
9 Brass 122.271733 42.348619 42.348619 37.574495 gainsboro (235, 229, 223) #ebe5df 15459807 110.500000 318513 12 0 202 34.634840 34.634840 30.730320
10 Brass 124.488185 43.045525 43.045525 38.397135 gainsboro (229, 229, 223) #e5e5df 15066591 109.833333 320231 11 0 206 34.578000 34.578000 30.843999
11 CopperWire 165.883977 56.808970 56.808970 52.266037 gainsboro (229, 229, 223) #e5e5df 15066591 78.666667 327884 10 0 156 34.246207 34.246207 31.507586
12 CopperWire 181.932704 62.185989 62.185989 57.560726 gainsboro (229, 229, 223) #e5e5df 15066591 78.666667 303195 9 0 156 34.180764 34.180764 31.638471
13 CopperWire 202.037768 68.887443 68.887443 64.262882 gainsboro (229, 229, 223) #e5e5df 15066591 80.166667 295451 9 0 157 34.096320 34.096320 31.807361
14 CopperWire 531.395758 178.691930 178.691930 174.011898 darkgray (169, 165, 159) #a9a59f 11117983 72.500000 92231 9 0 131 33.626902 33.626902 32.746196
15 CopperWire 535.292923 179.992400 179.992400 175.308123 darkgray (169, 165, 159) #a9a59f 11117983 75.333333 85458 9 0 131 33.625029 33.625029 32.749942
16 Copper 147.616898 50.731603 50.731603 46.153692 gainsboro (229, 229, 223) #e5e5df 15066591 84.833333 318670 9 0 153 34.367070 34.367070 31.265860
17 Copper 142.227555 49.009888 49.009888 44.207779 gainsboro (231, 229, 223) #e7e5df 15197663 89.833333 321043 10 0 160 34.458785 34.458785 31.082429
18 Copper 130.530910 45.105093 45.105093 40.320724 gainsboro (230, 229, 223) #e6e5df 15132127 84.000000 309376 11 0 162 34.555105 34.555105 30.889790
19 Copper 163.031541 55.942568 55.942568 51.146405 gainsboro (229, 229, 223) #e5e5df 15066591 78.166667 322371 10 0 155 34.313954 34.313954 31.372092
20 Copper 156.115532 53.638529 53.638529 48.838474 gainsboro (230, 229, 223) #e6e5df 15132127 78.166667 329941 10 0 155 34.358227 34.358227 31.283546
21 Copper 137.346139 47.383762 47.383762 42.578615 gainsboro (230, 229, 223) #e6e5df 15132127 77.166667 340247 10 0 153 34.499522 34.499522 31.000955
22 Copper 119.949182 41.568840 41.568840 36.811502 silver (198, 197, 191) #c6c5bf 13026751 85.333333 303151 11 0 131 34.655376 34.655376 30.689248
23 Copper 119.562843 41.439866 41.439866 36.683111 gainsboro (228, 227, 223) #e4e3df 15000543 91.666667 305393 9 0 131 34.659485 34.659485 30.681029
29 Iron 264.943069 89.816614 89.816614 85.309841 gainsboro (230, 229, 223) #e6e5df 15132127 79.500000 233823 10 0 157 33.900345 33.900345 32.199310
30 Iron 225.696231 76.731879 76.731879 72.232473 gainsboro (228, 227, 223) #e4e3df 15000543 79.833333 249211 10 0 159 33.997856 33.997856 32.004289
31 Iron 305.481411 103.468318 103.468318 98.544775 gainsboro (232, 229, 223) #e8e5df 15263199 81.666667 212646 11 0 158 33.870577 33.870577 32.258845
32 Iron 300.732499 101.887277 101.887277 96.957945 gainsboro (230, 229, 223) #e6e5df 15132127 81.833333 216346 11 0 160 33.879703 33.879703 32.240594
33 Iron 204.729830 69.866108 69.866108 64.997614 mistyrose (249, 229, 223) #f9e5df 16377311 78.500000 247280 9 0 155 34.126003 34.126003 31.747994
34 Iron 214.413784 73.088087 73.088087 68.237610 gainsboro (230, 229, 223) #e6e5df 15132127 84.333333 230280 8 0 151 34.087401 34.087401 31.825197
35 Iron 216.771872 73.841591 73.841591 69.088690 gainsboro (233, 229, 223) #e9e5df 15328735 86.833333 231255 10 0 155 34.064194 34.064194 31.871612
36 Iron 203.316977 69.359148 69.359148 64.598681 mistyrose (243, 229, 223) #f3e5df 15984095 116.333333 232920 10 0 154 34.113801 34.113801 31.772399
42 PaintedIron 155.320928 53.267878 53.267878 48.785172 mistyrose (246, 229, 223) #f6e5df 16180703 77.166667 345478 9 0 149 34.295364 34.295364 31.409272
43 PaintedIron 150.476603 51.651124 51.651124 47.174355 gainsboro (234, 229, 223) #eae5df 15394271 75.833333 353839 8 0 145 34.325020 34.325020 31.349960
44 PaintedIron 142.346993 49.095977 49.095977 44.155039 gainsboro (235, 229, 223) #ebe5df 15459807 73.500000 356636 8 0 142 34.490351 34.490351 31.019299
45 PaintedIron 143.721838 49.551402 49.551402 44.619034 gainsboro (235, 229, 223) #ebe5df 15459807 73.000000 371011 7 0 136 34.477295 34.477295 31.045410
46 PaintedIron 162.789726 55.806045 55.806045 51.177636 mistyrose (243, 229, 223) #f3e5df 15984095 76.000000 352642 8 0 141 34.281061 34.281061 31.437878
47 PaintedIron 148.261640 51.008323 51.008323 46.244994 mistyrose (243, 229, 223) #f3e5df 15984095 76.333333 339650 7 0 143 34.404262 34.404262 31.191476
48 StainlessSteel 280.133436 94.878361 94.878361 90.376714 gainsboro (233, 229, 223) #e9e5df 15328735 127.833333 263983 10 0 255 33.868988 33.868988 32.262023
49 StainlessSteel 245.591395 83.361354 83.361354 78.868687 mistyrose (244, 229, 223) #f4e5df 16049631 127.833333 284112 10 0 255 33.943109 33.943109 32.113783
50 StainlessSteel 208.979553 71.308299 71.308299 66.362955 gainsboro (234, 229, 223) #eae5df 15394271 127.833333 297745 11 0 255 34.122142 34.122142 31.755717
51 StainlessSteel 247.456815 84.128099 84.128099 79.200617 gainsboro (234, 229, 223) #eae5df 15394271 127.833333 296137 12 0 240 33.997083 33.997083 32.005834
52 StainlessSteel 214.909839 73.279863 73.279863 68.350113 gainsboro (235, 229, 223) #ebe5df 15459807 127.666667 304852 11 0 254 34.097956 34.097956 31.804087
53 StainlessSteel 194.590160 66.436627 66.436627 61.716906 gainsboro (232, 229, 223) #e8e5df 15263199 127.666667 314171 12 0 254 34.141822 34.141822 31.716355
In [32]:
# Adjust values to plot
df_plot.Sum_Ch0        = df_plot.Sum_Ch0 + 500 # to have diference lines during plot
df_plot.Sum_Ch1        = df_plot.Sum_Ch1 + 1000
df_plot.Sum_Ch2        = df_plot.Sum_Ch2 + 1500
df_plot.All_Bands      = df_plot.All_Bands + 2000

df_plot.Color_dec      = df_plot.Color_dec / 1000
df_plot.Color_dec      = df_plot.Color_dec - 10000
df_plot.Med_Extrems    = df_plot.Med_Extrems + 500
df_plot.Max_Histog     = df_plot.Max_Histog / 1000
df_plot.Idx_Max_Histog = df_plot.Idx_Max_Histog + 1000
df_plot.Min_Histog     = df_plot.Min_Histog * 100
df_plot.Idx_Min_Histog = df_plot.Idx_Min_Histog * 10

df_plot.perc_R = df_plot.perc_R + 1000
df_plot.perc_G = df_plot.perc_G + 1100
df_plot.perc_B = df_plot.perc_B + 1200

df_plot
Out[32]:
Material All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color Color_RGB Color_hex Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
0 Aluminum 2225.341887 576.708445 1076.708445 1571.924997 gainsboro (234, 229, 223) #eae5df 5394.271 609.333333 251.838 1009 0 2080 1034.040917 1134.040917 1231.918166
1 Aluminum 2232.768793 579.130088 1079.130088 1574.508617 gainsboro (230, 229, 223) #e6e5df 5132.127 606.166667 244.041 1011 0 2110 1033.995145 1133.995145 1232.009711
2 Aluminum 2281.688117 595.449458 1095.449458 1590.789201 gainsboro (234, 229, 223) #eae5df 5394.271 625.666667 246.108 1011 0 2470 1033.884801 1133.884801 1232.230398
3 Aluminum 2294.870824 599.847205 1099.847205 1595.176414 gainsboro (233, 229, 223) #e9e5df 5328.735 627.833333 239.672 1011 0 2550 1033.861338 1133.861338 1232.277325
4 Brass 2115.591735 540.112067 1040.112067 1535.367601 gainsboro (234, 229, 223) #eae5df 5394.271 627.666667 310.755 1011 0 2180 1034.701501 1134.701501 1230.596998
5 Brass 2115.114431 539.914903 1039.914903 1535.284625 gainsboro (230, 229, 223) #e6e5df 5132.127 627.666667 303.759 1011 0 2520 1034.674109 1134.674109 1230.651782
6 Brass 2112.513003 539.036133 1039.036133 1534.440737 gainsboro (230, 229, 223) #e6e5df 5132.127 627.666667 303.654 1010 0 2540 1034.694775 1134.694775 1230.610450
7 Brass 2115.000094 539.918248 1039.918248 1535.163598 gainsboro (232, 229, 223) #e8e5df 5263.199 627.666667 304.881 1011 0 2470 1034.711492 1134.711492 1230.577017
8 Brass 2124.310095 542.983402 1042.983402 1538.343291 gainsboro (229, 229, 223) #e5e5df 5066.591 627.666667 317.338 1011 0 2250 1034.577563 1134.577563 1230.844873
9 Brass 2122.271733 542.348619 1042.348619 1537.574495 gainsboro (235, 229, 223) #ebe5df 5459.807 610.500000 318.513 1012 0 2020 1034.634840 1134.634840 1230.730320
10 Brass 2124.488185 543.045525 1043.045525 1538.397135 gainsboro (229, 229, 223) #e5e5df 5066.591 609.833333 320.231 1011 0 2060 1034.578000 1134.578000 1230.843999
11 CopperWire 2165.883977 556.808970 1056.808970 1552.266037 gainsboro (229, 229, 223) #e5e5df 5066.591 578.666667 327.884 1010 0 1560 1034.246207 1134.246207 1231.507586
12 CopperWire 2181.932704 562.185989 1062.185989 1557.560726 gainsboro (229, 229, 223) #e5e5df 5066.591 578.666667 303.195 1009 0 1560 1034.180764 1134.180764 1231.638471
13 CopperWire 2202.037768 568.887443 1068.887443 1564.262882 gainsboro (229, 229, 223) #e5e5df 5066.591 580.166667 295.451 1009 0 1570 1034.096320 1134.096320 1231.807361
14 CopperWire 2531.395758 678.691930 1178.691930 1674.011898 darkgray (169, 165, 159) #a9a59f 1117.983 572.500000 92.231 1009 0 1310 1033.626902 1133.626902 1232.746196
15 CopperWire 2535.292923 679.992400 1179.992400 1675.308123 darkgray (169, 165, 159) #a9a59f 1117.983 575.333333 85.458 1009 0 1310 1033.625029 1133.625029 1232.749942
16 Copper 2147.616898 550.731603 1050.731603 1546.153692 gainsboro (229, 229, 223) #e5e5df 5066.591 584.833333 318.670 1009 0 1530 1034.367070 1134.367070 1231.265860
17 Copper 2142.227555 549.009888 1049.009888 1544.207779 gainsboro (231, 229, 223) #e7e5df 5197.663 589.833333 321.043 1010 0 1600 1034.458785 1134.458785 1231.082429
18 Copper 2130.530910 545.105093 1045.105093 1540.320724 gainsboro (230, 229, 223) #e6e5df 5132.127 584.000000 309.376 1011 0 1620 1034.555105 1134.555105 1230.889790
19 Copper 2163.031541 555.942568 1055.942568 1551.146405 gainsboro (229, 229, 223) #e5e5df 5066.591 578.166667 322.371 1010 0 1550 1034.313954 1134.313954 1231.372092
20 Copper 2156.115532 553.638529 1053.638529 1548.838474 gainsboro (230, 229, 223) #e6e5df 5132.127 578.166667 329.941 1010 0 1550 1034.358227 1134.358227 1231.283546
21 Copper 2137.346139 547.383762 1047.383762 1542.578615 gainsboro (230, 229, 223) #e6e5df 5132.127 577.166667 340.247 1010 0 1530 1034.499522 1134.499522 1231.000955
22 Copper 2119.949182 541.568840 1041.568840 1536.811502 silver (198, 197, 191) #c6c5bf 3026.751 585.333333 303.151 1011 0 1310 1034.655376 1134.655376 1230.689248
23 Copper 2119.562843 541.439866 1041.439866 1536.683111 gainsboro (228, 227, 223) #e4e3df 5000.543 591.666667 305.393 1009 0 1310 1034.659485 1134.659485 1230.681029
29 Iron 2264.943069 589.816614 1089.816614 1585.309841 gainsboro (230, 229, 223) #e6e5df 5132.127 579.500000 233.823 1010 0 1570 1033.900345 1133.900345 1232.199310
30 Iron 2225.696231 576.731879 1076.731879 1572.232473 gainsboro (228, 227, 223) #e4e3df 5000.543 579.833333 249.211 1010 0 1590 1033.997856 1133.997856 1232.004289
31 Iron 2305.481411 603.468318 1103.468318 1598.544775 gainsboro (232, 229, 223) #e8e5df 5263.199 581.666667 212.646 1011 0 1580 1033.870577 1133.870577 1232.258845
32 Iron 2300.732499 601.887277 1101.887277 1596.957945 gainsboro (230, 229, 223) #e6e5df 5132.127 581.833333 216.346 1011 0 1600 1033.879703 1133.879703 1232.240594
33 Iron 2204.729830 569.866108 1069.866108 1564.997614 mistyrose (249, 229, 223) #f9e5df 6377.311 578.500000 247.280 1009 0 1550 1034.126003 1134.126003 1231.747994
34 Iron 2214.413784 573.088087 1073.088087 1568.237610 gainsboro (230, 229, 223) #e6e5df 5132.127 584.333333 230.280 1008 0 1510 1034.087401 1134.087401 1231.825197
35 Iron 2216.771872 573.841591 1073.841591 1569.088690 gainsboro (233, 229, 223) #e9e5df 5328.735 586.833333 231.255 1010 0 1550 1034.064194 1134.064194 1231.871612
36 Iron 2203.316977 569.359148 1069.359148 1564.598681 mistyrose (243, 229, 223) #f3e5df 5984.095 616.333333 232.920 1010 0 1540 1034.113801 1134.113801 1231.772399
42 PaintedIron 2155.320928 553.267878 1053.267878 1548.785172 mistyrose (246, 229, 223) #f6e5df 6180.703 577.166667 345.478 1009 0 1490 1034.295364 1134.295364 1231.409272
43 PaintedIron 2150.476603 551.651124 1051.651124 1547.174355 gainsboro (234, 229, 223) #eae5df 5394.271 575.833333 353.839 1008 0 1450 1034.325020 1134.325020 1231.349960
44 PaintedIron 2142.346993 549.095977 1049.095977 1544.155039 gainsboro (235, 229, 223) #ebe5df 5459.807 573.500000 356.636 1008 0 1420 1034.490351 1134.490351 1231.019299
45 PaintedIron 2143.721838 549.551402 1049.551402 1544.619034 gainsboro (235, 229, 223) #ebe5df 5459.807 573.000000 371.011 1007 0 1360 1034.477295 1134.477295 1231.045410
46 PaintedIron 2162.789726 555.806045 1055.806045 1551.177636 mistyrose (243, 229, 223) #f3e5df 5984.095 576.000000 352.642 1008 0 1410 1034.281061 1134.281061 1231.437878
47 PaintedIron 2148.261640 551.008323 1051.008323 1546.244994 mistyrose (243, 229, 223) #f3e5df 5984.095 576.333333 339.650 1007 0 1430 1034.404262 1134.404262 1231.191476
48 StainlessSteel 2280.133436 594.878361 1094.878361 1590.376714 gainsboro (233, 229, 223) #e9e5df 5328.735 627.833333 263.983 1010 0 2550 1033.868988 1133.868988 1232.262023
49 StainlessSteel 2245.591395 583.361354 1083.361354 1578.868687 mistyrose (244, 229, 223) #f4e5df 6049.631 627.833333 284.112 1010 0 2550 1033.943109 1133.943109 1232.113783
50 StainlessSteel 2208.979553 571.308299 1071.308299 1566.362955 gainsboro (234, 229, 223) #eae5df 5394.271 627.833333 297.745 1011 0 2550 1034.122142 1134.122142 1231.755717
51 StainlessSteel 2247.456815 584.128099 1084.128099 1579.200617 gainsboro (234, 229, 223) #eae5df 5394.271 627.833333 296.137 1012 0 2400 1033.997083 1133.997083 1232.005834
52 StainlessSteel 2214.909839 573.279863 1073.279863 1568.350113 gainsboro (235, 229, 223) #ebe5df 5459.807 627.666667 304.852 1011 0 2540 1034.097956 1134.097956 1231.804087
53 StainlessSteel 2194.590160 566.436627 1066.436627 1561.716906 gainsboro (232, 229, 223) #e8e5df 5263.199 627.666667 314.171 1012 0 2540 1034.141822 1134.141822 1231.716355
In [35]:
df_plot.plot(y=["All_Bands","Sum_Ch0","Sum_Ch1", "Sum_Ch2","Color_dec","Med_Extrems"],
             figsize=(12,6), grid=True )

# Obtain legend (xticks) for X axis
loc_Array_sum = np.arange(len(df_plot.index))
# Position of X labels
xtick_loc = list(loc_Array_sum)  
# Name of x labels
xticks = list(df_plot.Material)
#-------

#plt.plot(df_plot.Array_sum)
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.xticks(xtick_loc, df_plot.Material, rotation=90)
plt.xlabel('Material',fontsize=18)
plt.legend(loc='upper right', ncol=3, fancybox=True, shadow=True)
plt.savefig(folder+"_Line Graph all channels information.png")
plt.show()
In [36]:
df_plot.perc_R = df_plot.perc_R - 1000
df_plot.perc_G = df_plot.perc_G - 1100
df_plot.perc_B = df_plot.perc_B - 1200
In [37]:
df_plot.plot(y=["perc_R","perc_G","perc_B"],
             figsize=(12,6), grid=True )

# Obtain legend (xticks) for X axis
loc_Array_sum = np.arange(len(df_plot.index))
# Position of X labels
xtick_loc = list(loc_Array_sum)  
# Name of x labels
xticks = list(df_plot.Material)
#-------

#plt.plot(df_plot.Array_sum)
plt.title('Percentage R,G,B',fontsize=20)
plt.ylabel('Percentages R,G,B',fontsize=18)
plt.xticks(xtick_loc, df_plot.Material, rotation=90)
plt.xlabel('Material',fontsize=18)
plt.legend(loc='upper right', ncol=3, fancybox=True, shadow=True)
plt.savefig(folder+"_Line Graph Percentage RGB.png")
plt.show()
In [38]:
# Create pivot table
df_plot1 = df_plot.groupby('Material')['All_Bands', 'Sum_Ch0','Sum_Ch1','Sum_Ch2','Color_dec',
                                       'Med_Extrems', 'Max_Histog', 'Idx_Max_Histog','Min_Histog',
                                       'Idx_Min_Histog','perc_R','perc_G','perc_B'].mean()
df_plot1
Out[38]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2258.667405 587.783799 1087.783799 1583.099807 5312.351000 617.250000 245.414750 1010.500000 0.0 2302.500000 -966.054450 -1066.054450 -1167.891100
Brass 2118.469897 541.051271 1041.051271 1536.367355 5216.387571 622.666667 311.304429 1011.000000 0.0 2291.428571 -965.346817 -1065.346817 -1169.306366
Copper 2139.547575 548.102519 1048.102519 1543.342538 4844.315000 583.645833 318.774000 1010.000000 0.0 1500.000000 -965.516559 -1065.516559 -1168.966881
CopperWire 2323.308626 609.313346 1109.313346 1604.681933 3487.147800 577.066667 220.843800 1009.200000 0.0 1462.000000 -966.044956 -1066.044956 -1167.910089
Iron 2242.010709 582.257378 1082.257378 1577.495954 5418.783000 586.104167 231.720125 1009.875000 0.0 1561.250000 -965.995015 -1065.995015 -1168.009970
PaintedIron 2150.486288 551.730125 1051.730125 1547.026038 5743.796333 575.305556 353.209333 1007.833333 0.0 1426.666667 -965.621108 -1065.621108 -1168.757784
StainlessSteel 2231.943533 578.898767 1078.898767 1574.145999 5481.652333 627.777778 293.500000 1011.000000 0.0 2521.666667 -965.971483 -1065.971483 -1168.057034
In [39]:
color = ['red','blue','green','orange','cyan','black','yellow']
In [40]:
df_All_Bands = pd.DataFrame(df_plot1.All_Bands)

df_All_Bands.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.savefig(folder+"_Sum of image matrix.png")
plt.show()
In [41]:
df_Max_Histog = pd.DataFrame(df_plot1.Max_Histog)

df_Max_Histog.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS-Max_Histog',fontsize=15)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Max_Histog',fontsize=18)
plt.savefig(folder+"_Max_Histog.png")
plt.show()
In [42]:
df_perc = pd.DataFrame(df_plot1.perc_R)

df_perc.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH CHANNELS-Percentage R',fontsize=15)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Idx_Max_Histog',fontsize=18)
plt.show()
In [43]:
loc_Array_sum = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location

loc_r = np.arange(len(df_plot1.index))-0.1 # Offsetting the tick-label location
loc_g = np.arange(len(df_plot1.index))-0.0 # Offsetting the tick-label location
loc_b = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location

#xtick_loc = list(loc_Array_sum) + list(loc_r) + list(loc_g) + list(loc_b)
#xticks = list(selected.keys())+ list(rejected.keys())
colors = ['darkred','red','green','blue','orange','cyan','black','yellow']
plt.figure(figsize=(12,5))

plt.bar(loc_r, df_plot1.perc_R, color='red', width=0.1, label='Band R')
plt.bar(loc_g, df_plot1.perc_G, color='green', width=0.1,label='Band G')
plt.bar(loc_b, df_plot1.perc_B, color='blue', width=0.1,label='Band B')

plt.title('Percentage R,G,B',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('RGB',fontsize=18)
plt.grid(True)
plt.xticks(xtick_loc, xticks, rotation=90)
plt.legend(bbox_to_anchor=(.8,0.8),\
    bbox_transform=plt.gcf().transFigure)
plt.savefig(folder+"_Bar Diagram_perc_RGB.png")
plt.show()
In [44]:
df_Idx_Min_Histog = pd.DataFrame(df_plot1.Idx_Min_Histog)

df_Idx_Min_Histog.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS-Idx_Min_Histog',fontsize=15)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Idx_Min_Histog',fontsize=18)
plt.savefig(folder+"_Idx_Min_Histogram.png")
plt.show()
In [45]:
df_Idx_Min_Histog = pd.DataFrame(df_plot1.Idx_Min_Histog)

df_Idx_Min_Histog.plot(kind='bar', y=0, color=color, legend=False, rot=0, figsize=(10,5))
plt.title('IMAGE WITH ALL CHANNELS-Idx_Min_Histog',fontsize=15)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Idx_Min_Histog',fontsize=18)
plt.show()
In [46]:
loc_Array_sum = np.arange(len(df_plot1.index))
xtick_loc = list(loc_Array_sum)  
xticks = list(df_plot1.index)

df_plot1.plot( y=["All_Bands","Sum_Ch0","Sum_Ch1", "Sum_Ch2","Color_dec","Med_Extrems"],
              figsize=(12,6), grid=True )
plt.xticks(xtick_loc, df_plot1.index, rotation=0)
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.legend(loc='upper right', ncol=1, fancybox=True, shadow=True,bbox_to_anchor=(1.1, 1.05))
plt.savefig(folder+"_resume all channels.png")
plt.show()
In [47]:
df_plot1
Out[47]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2258.667405 587.783799 1087.783799 1583.099807 5312.351000 617.250000 245.414750 1010.500000 0.0 2302.500000 -966.054450 -1066.054450 -1167.891100
Brass 2118.469897 541.051271 1041.051271 1536.367355 5216.387571 622.666667 311.304429 1011.000000 0.0 2291.428571 -965.346817 -1065.346817 -1169.306366
Copper 2139.547575 548.102519 1048.102519 1543.342538 4844.315000 583.645833 318.774000 1010.000000 0.0 1500.000000 -965.516559 -1065.516559 -1168.966881
CopperWire 2323.308626 609.313346 1109.313346 1604.681933 3487.147800 577.066667 220.843800 1009.200000 0.0 1462.000000 -966.044956 -1066.044956 -1167.910089
Iron 2242.010709 582.257378 1082.257378 1577.495954 5418.783000 586.104167 231.720125 1009.875000 0.0 1561.250000 -965.995015 -1065.995015 -1168.009970
PaintedIron 2150.486288 551.730125 1051.730125 1547.026038 5743.796333 575.305556 353.209333 1007.833333 0.0 1426.666667 -965.621108 -1065.621108 -1168.757784
StainlessSteel 2231.943533 578.898767 1078.898767 1574.145999 5481.652333 627.777778 293.500000 1011.000000 0.0 2521.666667 -965.971483 -1065.971483 -1168.057034
In [48]:
# Copy dataframe to arrange values
df_plot2 =  df_plot1.copy() 
df_plot2
Out[48]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2258.667405 587.783799 1087.783799 1583.099807 5312.351000 617.250000 245.414750 1010.500000 0.0 2302.500000 -966.054450 -1066.054450 -1167.891100
Brass 2118.469897 541.051271 1041.051271 1536.367355 5216.387571 622.666667 311.304429 1011.000000 0.0 2291.428571 -965.346817 -1065.346817 -1169.306366
Copper 2139.547575 548.102519 1048.102519 1543.342538 4844.315000 583.645833 318.774000 1010.000000 0.0 1500.000000 -965.516559 -1065.516559 -1168.966881
CopperWire 2323.308626 609.313346 1109.313346 1604.681933 3487.147800 577.066667 220.843800 1009.200000 0.0 1462.000000 -966.044956 -1066.044956 -1167.910089
Iron 2242.010709 582.257378 1082.257378 1577.495954 5418.783000 586.104167 231.720125 1009.875000 0.0 1561.250000 -965.995015 -1065.995015 -1168.009970
PaintedIron 2150.486288 551.730125 1051.730125 1547.026038 5743.796333 575.305556 353.209333 1007.833333 0.0 1426.666667 -965.621108 -1065.621108 -1168.757784
StainlessSteel 2231.943533 578.898767 1078.898767 1574.145999 5481.652333 627.777778 293.500000 1011.000000 0.0 2521.666667 -965.971483 -1065.971483 -1168.057034
In [49]:
df_plot2.Med_Extrems    = df_plot2.Med_Extrems + 2000
df_plot2.Max_Histog     = df_plot2.Max_Histog  + 1500
df_plot2.Idx_Max_Histog = df_plot2.Idx_Max_Histog + 1000
df_plot2.Min_Histog     = df_plot2.Min_Histog + 500
df_plot2.Idx_Min_Histog = df_plot2.Idx_Min_Histog - 1000
df_plot2.head()
Out[49]:
All_Bands Sum_Ch0 Sum_Ch1 Sum_Ch2 Color_dec Med_Extrems Max_Histog Idx_Max_Histog Min_Histog Idx_Min_Histog perc_R perc_G perc_B
Material
Aluminum 2258.667405 587.783799 1087.783799 1583.099807 5312.351000 2617.250000 1745.414750 2010.500 500.0 1302.500000 -966.054450 -1066.054450 -1167.891100
Brass 2118.469897 541.051271 1041.051271 1536.367355 5216.387571 2622.666667 1811.304429 2011.000 500.0 1291.428571 -965.346817 -1065.346817 -1169.306366
Copper 2139.547575 548.102519 1048.102519 1543.342538 4844.315000 2583.645833 1818.774000 2010.000 500.0 500.000000 -965.516559 -1065.516559 -1168.966881
CopperWire 2323.308626 609.313346 1109.313346 1604.681933 3487.147800 2577.066667 1720.843800 2009.200 500.0 462.000000 -966.044956 -1066.044956 -1167.910089
Iron 2242.010709 582.257378 1082.257378 1577.495954 5418.783000 2586.104167 1731.720125 2009.875 500.0 561.250000 -965.995015 -1065.995015 -1168.009970
In [50]:
loc_Array_sum = np.arange(len(df_plot2.index))
xtick_loc = list(loc_Array_sum)  
xticks = list(df_plot1.index)

df_plot2.plot( y=['Color_dec','Med_Extrems', 'Max_Histog', 'Idx_Max_Histog',
                  'Min_Histog','Idx_Min_Histog','perc_R','perc_G','perc_B'],figsize=(12,6), grid=True )
plt.xticks(xtick_loc, df_plot2.index, rotation=0)
plt.title('IMAGE WITH ALL CHANNELS - Color and Histogram',fontsize=18)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Average of Color and Histogram',fontsize=18)
plt.legend(loc='upper right', ncol=1, fancybox=True, shadow=True,bbox_to_anchor=(1.1, 1.05))
plt.savefig(folder+"_color_and_histogram.png")
plt.show()
In [51]:
# Create Xlabels
loc_Array_sum = np.arange(len(df_plot1.index))+0.0 # Offsetting the tick-label location
loc_r = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location
loc_g = np.arange(len(df_plot1.index))-0.0 # Offsetting the tick-label location
loc_b = np.arange(len(df_plot1.index))-0.1 # Offsetting the tick-label location

xtick_loc = list(loc_g)  
xticks = list(df_plot1.index)
In [52]:
# Plot
In [53]:
# Plot  Bar Graph
#df_plot1.plot(kind='bar', figsize=(12,5), grid=True, color='darkred',fontsize=18)
loc_Array_sum = np.arange(len(df_plot1.index))+0.0 # Offsetting the tick-label location
loc_b = np.arange(len(df_plot1.index))+0.1 # Offsetting the tick-label location
loc_g = np.arange(len(df_plot1.index))-0.0 # Offsetting the tick-label location
loc_r = np.arange(len(df_plot1.index))-0.1 # Offsetting the tick-label location

#xtick_loc = list(loc_Array_sum) + list(loc_r) + list(loc_g) + list(loc_b)
#xticks = list(selected.keys())+ list(rejected.keys())
colors = ['darkred','red','green','blue','orange','cyan','black','yellow']
plt.figure(figsize=(12,5))

plt.bar(loc_Array_sum, df_plot1.All_Bands, color=colors[0], width=0.1, label='All_Bands')
plt.bar(loc_r, df_plot1.Sum_Ch0, color=colors[1], width=0.1,label='Band R')
plt.bar(loc_g, df_plot1.Sum_Ch1, color=colors[2], width=0.1,label='Band G')
plt.bar(loc_b, df_plot1.Sum_Ch2, color=colors[3], width=0.1,label='Band B')

plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.grid(True)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.xticks(xtick_loc, xticks, rotation=0)
plt.legend(bbox_to_anchor=(.8,0.8),\
    bbox_transform=plt.gcf().transFigure)
plt.savefig(folder+"_all bands.png")
plt.show()
In [54]:
plt.figure(1)
plt.figure(figsize=(17, 4))
plt.tight_layout()
plt.subplot(231)
plt.title('IMAGE CHANNEL 0')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.Sum_Ch0, 'k--')

plt.subplot(232)
plt.title('IMAGE CHANNEL 1')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.Sum_Ch1,  'r--')

plt.subplot(233)
plt.title('IMAGE CHANNEL 2')
plt.xticks(rotation=45)
plt.plot(df_plot1.Sum_Ch2,  'g--')
plt.grid(True)
plt.suptitle('Sum Matrix of channels',fontsize=20,y=1.08)
#plt.tight_layout()
plt.subplots_adjust(top=0.8)
plt.savefig(folder+"_Sum Matrix of channels.png")
plt.show()
<Figure size 432x288 with 0 Axes>
In [55]:
# Pèrcentage of R,G,B
plt.figure(1)
plt.figure(figsize=(17, 4))
plt.tight_layout()
plt.subplot(231)
plt.title('IMAGE CHANNEL R')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.perc_R, 'r--')

plt.subplot(232)
plt.title('IMAGE CHANNEL G')
plt.xticks(rotation=45)
plt.grid(True)
plt.plot(df_plot1.perc_G,  'g--')

plt.subplot(233)
plt.title('IMAGE CHANNEL B')
plt.xticks(rotation=45)
plt.plot(df_plot1.perc_B,  'b--')
plt.grid(True)

plt.suptitle('Percentage of R,G,B',fontsize=20,y=1.08)
#plt.tight_layout()
plt.subplots_adjust(top=0.8)
plt.savefig(folder+'_Percentage_RGB.png', bbox_inches='tight', pad_inches=0.0)
plt.show()
<Figure size 432x288 with 0 Axes>
In [56]:
# Plot channel based
plt.plot(df_plot1.All_Bands)
plt.title('IMAGE WITH ALL CHANNELS',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Sum of image matrix',fontsize=18)
plt.xticks(rotation=45)
plt.grid(True)
plt.savefig(folder+'_Sum_all_channels.png', bbox_inches='tight', pad_inches=0.0)
plt.show()
In [57]:
# Plot based on color
plt.plot(df_plot1.Color_dec/1000)
plt.title('IMAGE WITH COLORS BASED',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Average of color image',fontsize=18)
plt.xticks(rotation=45)
plt.grid(True)
plt.show()
In [58]:
# Plot based on Extrems of the Bands
plt.plot(df_plot1.Med_Extrems/10)
plt.title('IMAGE WITH EXTREMS BANDS BASED',fontsize=20)
plt.xlabel('Material',fontsize=18)
plt.ylabel('Average of Extrems image',fontsize=18)
plt.xticks(rotation=45)
plt.grid(True)
plt.savefig(folder+'_color_based.png', bbox_inches='tight', pad_inches=0.0)
plt.show()

Create Histograms

https://www.cambridgeincolour.com/pt-br/tutoriais/histograms1.htm

https://www.cambridgeincolour.com/pt-br/tutoriais/image-noise.htm

http://www2.ic.uff.br/~aconci/aula-2-2015-AI.pdf

https://www.ic.unicamp.br/~ra144681/misc/files/ApostilaProcDeImagesParteI.pdf

histograma, também conhecido como distribuição de frequências ou diagrama das frequências, é a representação gráfica, em colunas (retângulos), de um conjunto de dados previamente tabulado e dividido em classes uniformes.

Histogramas:

O histograma de uma imagem cinza e uma funcao discreta h(l) (vetor) que produz o numero de ocorrencias de cada nıvel de cinza na imagem. O histograma normalizado h(l)/|DI | representa a distribuicao de probabilidade dos valores dos pixels.

Imagens claras possuem histogramas com altas concentracoes de pixels de alto brilho. Imagens escuras possuem histogramas com altas concentracoes de pixels de baixo brilho. O contraste maior esta associado a um grau maior de dispersao do histograma.

No caso de imagens multiespectrais, cada banda e´ requantizada em um certo numero de intervalos, de forma que o espaco de caracterısticas Zk ´e dividido em hipercubos (bins do histograma). A contagem de cores em cada bin ´e usada no c´alculo do histograma. Assim, para cada bin, precisamos analisar os n´ıveis de cinza das 3 bandas da imagem colorida (RGB).

Entendendo Histogramas:

O histograma mostra a frequencia dos valores de brilho da imagem, ou seja, a quantidade de luz presente na imagem.

In [59]:
list_of_images
Out[59]:
['Aluminum_01.TIF',
 'Aluminum_02.TIF',
 'Aluminum_03.TIF',
 'Aluminum_04.TIF',
 'Brass_01.TIF',
 'Brass_02.TIF',
 'Brass_04.TIF',
 'Brass_05.TIF',
 'Brass_06.TIF',
 'Brass_07.TIF',
 'Brass_08.TIF',
 'CopperWire_01.TIF',
 'CopperWire_02.TIF',
 'CopperWire_03.TIF',
 'CopperWire_04.TIF',
 'CopperWire_05.TIF',
 'Copper_01.TIF',
 'Copper_02.TIF',
 'Copper_03.TIF',
 'Copper_04.TIF',
 'Copper_05.TIF',
 'Copper_06.TIF',
 'Copper_07.TIF',
 'Copper_08.TIF',
 'Enh_Aluminum_01.TIF',
 'Enh_Aluminum_02.TIF',
 'Enh_Aluminum_03.TIF',
 'Enh_Aluminum_04.TIF',
 'Enh_Brass_01.TIF',
 'Iron_01.TIF',
 'Iron_02.TIF',
 'Iron_03.TIF',
 'Iron_04.TIF',
 'Iron_05.TIF',
 'Iron_06.TIF',
 'Iron_07.TIF',
 'Iron_08.TIF',
 'MASK_Enh_Aluminum_01.TIF',
 'MASK_Enh_Aluminum_02.TIF',
 'MASK_Enh_Aluminum_03.TIF',
 'MASK_Enh_Aluminum_04.TIF',
 'MASK_Enh_Brass_01.TIF',
 'PaintedIron_01.TIF',
 'PaintedIron_02.TIF',
 'PaintedIron_03.TIF',
 'PaintedIron_04.TIF',
 'PaintedIron_05.TIF',
 'PaintedIron_06.TIF',
 'StainlessSteel_01.TIF',
 'StainlessSteel_02.TIF',
 'StainlessSteel_03.TIF',
 'StainlessSteel_04.TIF',
 'StainlessSteel_05.TIF',
 'StainlessSteel_06.TIF']
In [60]:
# Delete values from list - Bad image names
def remove_values_from_list(list_values, mask):
    list_new = list()
    for list_value in list_values:
        if(mask not in list_value):
            print(list_value)
            list_new.append(list_value)
    return list_new 
In [61]:
# Remove from list names with 'MASK'
new_list = remove_values_from_list(list_of_images, 'MASK')
Aluminum_01.TIF
Aluminum_02.TIF
Aluminum_03.TIF
Aluminum_04.TIF
Brass_01.TIF
Brass_02.TIF
Brass_04.TIF
Brass_05.TIF
Brass_06.TIF
Brass_07.TIF
Brass_08.TIF
CopperWire_01.TIF
CopperWire_02.TIF
CopperWire_03.TIF
CopperWire_04.TIF
CopperWire_05.TIF
Copper_01.TIF
Copper_02.TIF
Copper_03.TIF
Copper_04.TIF
Copper_05.TIF
Copper_06.TIF
Copper_07.TIF
Copper_08.TIF
Enh_Aluminum_01.TIF
Enh_Aluminum_02.TIF
Enh_Aluminum_03.TIF
Enh_Aluminum_04.TIF
Enh_Brass_01.TIF
Iron_01.TIF
Iron_02.TIF
Iron_03.TIF
Iron_04.TIF
Iron_05.TIF
Iron_06.TIF
Iron_07.TIF
Iron_08.TIF
PaintedIron_01.TIF
PaintedIron_02.TIF
PaintedIron_03.TIF
PaintedIron_04.TIF
PaintedIron_05.TIF
PaintedIron_06.TIF
StainlessSteel_01.TIF
StainlessSteel_02.TIF
StainlessSteel_03.TIF
StainlessSteel_04.TIF
StainlessSteel_05.TIF
StainlessSteel_06.TIF
In [62]:
# Remove from list names with 'Enh'
new_list = remove_values_from_list(new_list, 'Enh')
Aluminum_01.TIF
Aluminum_02.TIF
Aluminum_03.TIF
Aluminum_04.TIF
Brass_01.TIF
Brass_02.TIF
Brass_04.TIF
Brass_05.TIF
Brass_06.TIF
Brass_07.TIF
Brass_08.TIF
CopperWire_01.TIF
CopperWire_02.TIF
CopperWire_03.TIF
CopperWire_04.TIF
CopperWire_05.TIF
Copper_01.TIF
Copper_02.TIF
Copper_03.TIF
Copper_04.TIF
Copper_05.TIF
Copper_06.TIF
Copper_07.TIF
Copper_08.TIF
Iron_01.TIF
Iron_02.TIF
Iron_03.TIF
Iron_04.TIF
Iron_05.TIF
Iron_06.TIF
Iron_07.TIF
Iron_08.TIF
PaintedIron_01.TIF
PaintedIron_02.TIF
PaintedIron_03.TIF
PaintedIron_04.TIF
PaintedIron_05.TIF
PaintedIron_06.TIF
StainlessSteel_01.TIF
StainlessSteel_02.TIF
StainlessSteel_03.TIF
StainlessSteel_04.TIF
StainlessSteel_05.TIF
StainlessSteel_06.TIF
In [63]:
list_of_images = new_list
In [64]:
path = mypath + '/' + folder + '/'
path
Out[64]:
'C:\\Users\\manuel.robalinho\\Google Drive\\UPT_Portucalense\\Trabalho final\\Classificacao_Sucata\\Jupyter_Notebook/imagedata08/'
In [65]:
# HISTOGRAMS
# Print Histograms for all folder images
# list_of_images has all the name files

for x in list_of_images:
    print('Cv2 Histogram for File:', x)
    print_cv_hist(path, x)
Cv2 Histogram for File: Aluminum_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_01.TIF
Cv2 Histogram for File: Aluminum_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_02.TIF
Cv2 Histogram for File: Aluminum_03.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_03.TIF
Cv2 Histogram for File: Aluminum_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_04.TIF
Cv2 Histogram for File: Brass_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_01.TIF
Cv2 Histogram for File: Brass_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_02.TIF
Cv2 Histogram for File: Brass_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_04.TIF
Cv2 Histogram for File: Brass_05.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_05.TIF
Cv2 Histogram for File: Brass_06.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_06.TIF
Cv2 Histogram for File: Brass_07.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_07.TIF
Cv2 Histogram for File: Brass_08.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_08.TIF
Cv2 Histogram for File: CopperWire_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_01.TIF
Cv2 Histogram for File: CopperWire_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_02.TIF
Cv2 Histogram for File: CopperWire_03.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_03.TIF
Cv2 Histogram for File: CopperWire_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_04.TIF
Cv2 Histogram for File: CopperWire_05.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_05.TIF
Cv2 Histogram for File: Copper_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_01.TIF
Cv2 Histogram for File: Copper_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_02.TIF
Cv2 Histogram for File: Copper_03.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_03.TIF
Cv2 Histogram for File: Copper_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_04.TIF
Cv2 Histogram for File: Copper_05.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_05.TIF
Cv2 Histogram for File: Copper_06.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_06.TIF
Cv2 Histogram for File: Copper_07.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_07.TIF
Cv2 Histogram for File: Copper_08.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_08.TIF
Cv2 Histogram for File: Iron_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_01.TIF
Cv2 Histogram for File: Iron_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_02.TIF
Cv2 Histogram for File: Iron_03.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_03.TIF
Cv2 Histogram for File: Iron_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_04.TIF
Cv2 Histogram for File: Iron_05.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_05.TIF
Cv2 Histogram for File: Iron_06.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_06.TIF
Cv2 Histogram for File: Iron_07.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_07.TIF
Cv2 Histogram for File: Iron_08.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_08.TIF
Cv2 Histogram for File: PaintedIron_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_01.TIF
Cv2 Histogram for File: PaintedIron_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_02.TIF
Cv2 Histogram for File: PaintedIron_03.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_03.TIF
Cv2 Histogram for File: PaintedIron_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_04.TIF
Cv2 Histogram for File: PaintedIron_05.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_05.TIF
Cv2 Histogram for File: PaintedIron_06.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_06.TIF
Cv2 Histogram for File: StainlessSteel_01.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_01.TIF
Cv2 Histogram for File: StainlessSteel_02.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_02.TIF
Cv2 Histogram for File: StainlessSteel_03.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_03.TIF
Cv2 Histogram for File: StainlessSteel_04.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_04.TIF
Cv2 Histogram for File: StainlessSteel_05.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_05.TIF
Cv2 Histogram for File: StainlessSteel_06.TIF
Cv2 Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_06.TIF
In [66]:
# HISTOGRAMS
# Print Histograms for all folder images
# list_of_images has all the name files

for x in list_of_images:
    print('Matplot Histogram for File:', x)
    print_matplot_hist(path, x)
Matplot Histogram for File: Aluminum_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_01.TIF
Matplot Histogram for File: Aluminum_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_02.TIF
Matplot Histogram for File: Aluminum_03.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_03.TIF
Matplot Histogram for File: Aluminum_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Aluminum_04.TIF
Matplot Histogram for File: Brass_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_01.TIF
Matplot Histogram for File: Brass_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_02.TIF
Matplot Histogram for File: Brass_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_04.TIF
Matplot Histogram for File: Brass_05.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_05.TIF
Matplot Histogram for File: Brass_06.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_06.TIF
Matplot Histogram for File: Brass_07.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_07.TIF
Matplot Histogram for File: Brass_08.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Brass_08.TIF
Matplot Histogram for File: CopperWire_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_01.TIF
Matplot Histogram for File: CopperWire_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_02.TIF
Matplot Histogram for File: CopperWire_03.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_03.TIF
Matplot Histogram for File: CopperWire_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_04.TIF
Matplot Histogram for File: CopperWire_05.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/CopperWire_05.TIF
Matplot Histogram for File: Copper_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_01.TIF
Matplot Histogram for File: Copper_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_02.TIF
Matplot Histogram for File: Copper_03.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_03.TIF
Matplot Histogram for File: Copper_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_04.TIF
Matplot Histogram for File: Copper_05.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_05.TIF
Matplot Histogram for File: Copper_06.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_06.TIF
Matplot Histogram for File: Copper_07.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_07.TIF
Matplot Histogram for File: Copper_08.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Copper_08.TIF
Matplot Histogram for File: Iron_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_01.TIF
Matplot Histogram for File: Iron_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_02.TIF
Matplot Histogram for File: Iron_03.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_03.TIF
Matplot Histogram for File: Iron_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_04.TIF
Matplot Histogram for File: Iron_05.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_05.TIF
Matplot Histogram for File: Iron_06.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_06.TIF
Matplot Histogram for File: Iron_07.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_07.TIF
Matplot Histogram for File: Iron_08.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/Iron_08.TIF
Matplot Histogram for File: PaintedIron_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_01.TIF
Matplot Histogram for File: PaintedIron_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_02.TIF
Matplot Histogram for File: PaintedIron_03.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_03.TIF
Matplot Histogram for File: PaintedIron_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_04.TIF
Matplot Histogram for File: PaintedIron_05.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_05.TIF
Matplot Histogram for File: PaintedIron_06.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/PaintedIron_06.TIF
Matplot Histogram for File: StainlessSteel_01.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_01.TIF
Matplot Histogram for File: StainlessSteel_02.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_02.TIF
Matplot Histogram for File: StainlessSteel_03.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_03.TIF
Matplot Histogram for File: StainlessSteel_04.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_04.TIF
Matplot Histogram for File: StainlessSteel_05.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_05.TIF
Matplot Histogram for File: StainlessSteel_06.TIF
Matplot Hist from file: C:\Users\manuel.robalinho\Google Drive\UPT_Portucalense\Trabalho final\Classificacao_Sucata\Jupyter_Notebook/imagedata08/StainlessSteel_06.TIF
In [67]:
print('Finished')
Finished
In [ ]: